lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 23 Jul 2020 12:05:23 +0100
From:   Mark Brown <broonie@...nel.org>
To:     Vincent Whitchurch <vincent.whitchurch@...s.com>
Cc:     Mike Looijmans <mike.looijmans@...ic.nl>,
        linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
        balbi@...nel.org, gregkh@...uxfoundation.org, lgirdwood@...il.com
Subject: Re: [PATCH v3] usb: dwc3: Add support for VBUS power control

On Thu, Jul 23, 2020 at 09:56:14AM +0200, Vincent Whitchurch wrote:
> On Fri, Jun 19, 2020 at 04:25:12PM +0200, Mike Looijmans wrote:
> > +void dwc3_set_vbus(struct dwc3 *dwc, bool enable)
> > +{
> > +	int ret;
> > +
> > +	if (enable != dwc->vbus_reg_enabled) {
> > +		if (enable)
> > +			ret = regulator_enable(dwc->vbus_reg);
> > +		else
> > +			ret = regulator_disable(dwc->vbus_reg);
 
> dwc->vbus_reg is set to NULL when the regulator is not present.  These
> regulator_* functions expect a non-NULL pointer so a NULL check is
> required before calling them.

Does the device actually support running without power so that's a thing
that can happen?  _get_optional() should only ever be used for supplies
that may be physically absent.

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ