Re: [PATCH] gpio: Propagate all errors in devm_get_gpiod_from_child()

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

 



On Fri, Feb 19, 2016 at 11:00 AM, Geert Uytterhoeven
<geert+renesas@xxxxxxxxx> wrote:

> devm_get_gpiod_from_child() tries several property suffixes to find a
> GPIO descriptor. If all suffixes fail and no probe deferral has been
> detected, it returns the error of the last try.
>
> However, if any but the last try fails with a real error (e.g. -EBUSY),
> this error is not propagated, and -ENOENT will be returned.
> This confuses drivers that e.g. want to detect if a GPIO is already in
> use.
>
> To fix this, change the loop logic to continue on -ENOENT, which
> indicates the property was not found and the next suffix should be
> tried, and propagate all other detected errors.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>

Patch applied.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux