[PATCH RFC 1/6] ARM: pxa: Convert Spitz OHCI to GPIO descriptors

Linus Walleij linus.walleij at linaro.org
Mon Oct 2 01:00:04 PDT 2023


On Sun, Oct 1, 2023 at 11:22 AM Andy Shevchenko <andy at kernel.org> wrote:

 One more thing, though. I think those warnings are incomplete or actually
> reversed, and we outta use WARN_ON(IS_ERR(desc)), no?
>
> This way it will fix my concerns and your concerns will be satisfied, right?
> So, if gpiod_get() returns an error pointer and then we are trying to
> free it with GPIOLIB=n, _then_ we will got a warning and it's obvious that
> driver has to be prepared for that, otherwise if we have it NULL and
> call for gpiod_get_optional(), even with GPIOLIB=n, it's fine to free, we
> don't care.

Since we return return ERR_PTR(-ENOSYS) when compiled out
this sounds right to me!

Yours,
Linus Walleij



More information about the linux-arm-kernel mailing list