Re: [PATCH v2] gpio: Fix gpiochip_add_data_with_key() error path

2019-04-25 Thread Linus Walleij
On Wed, Apr 24, 2019 at 3:59 PM Geert Uytterhoeven wrote: > The err_remove_chip block is too coarse, and may perform cleanup that > must not be done. E.g. if of_gpiochip_add() fails, of_gpiochip_remove() > is still called, causing: Good catch! Patch applied for fixes. Yours, Linus Walleij

[PATCH v2] gpio: Fix gpiochip_add_data_with_key() error path

2019-04-24 Thread Geert Uytterhoeven
The err_remove_chip block is too coarse, and may perform cleanup that must not be done. E.g. if of_gpiochip_add() fails, of_gpiochip_remove() is still called, causing: OF: ERROR: Bad of_node_put() on /soc/gpio@e605 CPU: 1 PID: 20 Comm: kworker/1:1 Not tainted 5.1.0-rc2-koelsch+ #407