Messages in this thread | | | From | Linus Walleij <> | Date | Thu, 28 Mar 2019 17:58:28 +0100 | Subject | Re: [PATCH 1/3] gpio: of: Fix of_gpiochip_add() error path |
| |
On Thu, Mar 28, 2019 at 2:13 PM Geert Uytterhoeven <geert+renesas@glider.be> 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@glider.be>
Patch applied.
Yours, Linus Walleij
| |