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]
Message-ID: <YrFr3s50ZMD1Et9W@hovoldconsulting.com>
Date:   Tue, 21 Jun 2022 08:57:34 +0200
From:   Johan Hovold <johan@...nel.org>
To:     Andy Shevchenko <andy.shevchenko@...il.com>
Cc:     frank zago <frank@...o.net>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Bartosz Golaszewski <bgolaszewski@...libre.com>,
        Wolfram Sang <wsa@...nel.org>, USB <linux-usb@...r.kernel.org>,
        Lee Jones <lee.jones@...aro.org>,
        Linus Walleij <linus.walleij@...aro.org>,
        "open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
        linux-i2c <linux-i2c@...r.kernel.org>
Subject: Re: [PATCH v6 2/4] gpio: ch341: add GPIO MFD cell driver for the
 CH341

On Mon, Jun 20, 2022 at 06:08:19PM +0200, Andy Shevchenko wrote:
> On Mon, Jun 20, 2022 at 12:26 PM Johan Hovold <johan@...nel.org> wrote:
> > On Wed, Jun 15, 2022 at 08:37:45PM -0500, frank zago wrote:
> 
> ...
> 
> > > +     /* Create an URB for handling interrupt */
> > > +     dev->irq_urb = usb_alloc_urb(0, GFP_KERNEL);
> > > +     if (!dev->irq_urb)
> > > +             return dev_err_probe(&pdev->dev, -ENOMEM, "Cannot allocate the int URB\n");
> >
> > This isn't how dev_err_probe() is used.
> 
> While I agree on the below comment, what does this imply?

That you should only use dev_err_probe() to handle -EPROBE_DEFER. That's
what it is was added for, documented as, and it is what the
implementation still tells you.

I see now that there has recently been some mission creep:

	7065f92255bb ("driver core: Clarify that dev_err_probe() is OK even w/out -EPROBE_DEFER")

I'm not sure I agree with that, but fortunately we don't need to have
that debate in this case due to the below.
 
> > And allocation failures are already logged so just return -ENOMEM here.

Johan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ