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

From: Linus Walleij
Date: Thu Apr 25 2019 - 03:15:23 EST


On Wed, Apr 24, 2019 at 3:59 PM Geert Uytterhoeven
<geert+renesas@xxxxxxxxx> 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