Re: [PATCH] USB: bcma: Make GPIO explicitly optional

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Nov 07, 2022 at 02:38:35PM +0100, Linus Walleij wrote:
> On Mon, Nov 7, 2022 at 10:07 AM Linus Walleij <linus.walleij@xxxxxxxxxx> wrote:
> 
> > What the code does is to not check the return value from
> > devm_gpiod_get() and then avoid using an erroneous GPIO descriptor
> > with IS_ERR_OR_NULL().
> >
> > This will miss real errors from the GPIO core that should not be
> > ignored, such as probe deferral.
> >
> > Instead request the GPIO as explicitly optional, which means that
> > if it doesn't exist, the descriptor returned will be NULL.
> >
> > Then we can add error handling and also avoid just doing this on
> > the device tree path, and simplify the site where the optional
> > GPIO descriptor is used.
> >
> > There were some problems with cleaning up this GPIO descriptor
> > use in the past, but this is the proper way to deal with it.
> >
> > Cc: Rafał Miłecki <rafal@xxxxxxxxxx>
> > Cc: Chuhong Yuan <hslester96@xxxxxxxxx>
> > Signed-off-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
> 
> Actually I think this is something of a regression that needs
> a Cc: stable tag.
> 
> On my router (DIR-890L) this is needed for the USB ports to probe
> and work, I think due to recent refactorings involving device links
> and whatnot, i.e. probe deferral happens all the time and the
> deferral error has to be handled. I think many BCM systems are
> affected.

Now queued up for the next -rc release, thanks.

greg k-h



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux