Re: [PATCH 1/3] gpio: of: Fix of_gpiochip_add() error path

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

 



On Thu, Mar 28, 2019 at 2:13 PM Geert Uytterhoeven
<geert+renesas@xxxxxxxxx> wrote:

> If the call to of_gpiochip_scan_gpios() in of_gpiochip_add() fails, no
> error handling is performed.  This lead to the need of callers to call
> of_gpiochip_remove() on failure, which causes "BAD of_node_put() on ..."
> if the failure happened before the call to of_node_get().
>
> Fix this by adding proper error handling.
>
> Note that calling gpiochip_remove_pin_ranges() multiple times causes no
> harm: subsequent calls are a no-op.
>
> Fixes: dfbd379ba9b7431e ("gpio: of: Return error if gpio hog configuration failed")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>

Patch applied.

Yours,
Linus Walleij



[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