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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Fri, 21 Nov 2014 09:03:31 -0600
From:	Felipe Balbi <balbi@...com>
To:	Arjun Sreedharan <arjun024@...il.com>
CC:	Felipe Balbi <balbi@...com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	<linux-usb@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] usb:phy: propagate __of_usb_find_phy()'s error on failure

On Fri, Nov 21, 2014 at 12:19:42PM +0530, Arjun Sreedharan wrote:
> On 21 November 2014 01:09, Felipe Balbi <balbi@...com> wrote:
> 
> > On Thu, Nov 20, 2014 at 09:23:36PM +0530, Arjun Sreedharan wrote:
> > > When __of_usb_find_phy() fails, it returns -ENODEV - its
> > > error code has to be returned by devm_usb_get_phy_by_phandle().
> > > Only when the former function succeeds and try_module_get()
> > > fails should -EPROBE_DEFER be returned.
> > >
> > > Signed-off-by: Arjun Sreedharan <arjun024@...il.com>
> > > ---
> > >  drivers/usb/phy/phy.c | 4 +++-
> > >  1 file changed, 3 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/usb/phy/phy.c b/drivers/usb/phy/phy.c
> > > index 045cd30..0310112 100644
> > > --- a/drivers/usb/phy/phy.c
> > > +++ b/drivers/usb/phy/phy.c
> > > @@ -191,7 +191,9 @@ struct usb_phy *devm_usb_get_phy_by_phandle(struct
> > device *dev,
> > >
> > >       phy = __of_usb_find_phy(node);
> > >       if (IS_ERR(phy) || !try_module_get(phy->dev->driver->owner)) {
> > > -             phy = ERR_PTR(-EPROBE_DEFER);
> > > +             if (!IS_ERR(phy))
> > > +                     phy = ERR_PTR(-EPROBE_DEFER);
> > > +
> >
> > trailing whitespace here. I'll fix it myself this time, but next time be
> > more careful.
> >
> 
> sorry about that. my bloody vi. thanks

add these to your .vimrc :-)

" Highlight redundant whitespaces
highlight RedundantWhitespace ctermbg=red guibg=red
match RedundantWhitespace /\s\+$\| \+\ze\t/

-- 
balbi

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ