Re: [PATCH] gpio: fix resource unwinding order in error path

From: Bartosz Golaszewski
Date: Fri Mar 01 2024 - 03:31:21 EST


On Fri, Mar 1, 2024 at 9:23 AM Johan Hovold <johan@xxxxxxxxxx> wrote:
>
> On Thu, Feb 29, 2024 at 06:25:49PM +0100, Bartosz Golaszewski wrote:
> > From: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx>
> >
> > Hogs are added *after* ACPI so should be removed *before* in error path.
> >
> > Fixes: 6d86750ce623 ("gpio: fix gpio leak in gpiochip_add error path")
>
> This Fixes tag is not correct. Back then hogs were only implemented by
> OF so you need to find another commit to blame here.
>
> git grep -pW '^int gpiochip_add(' 6d86750ce62391f5a0a7985d5c050c2e3c823ab9
>
> Johan

Ah, indeed, looks like it's me who really borked with commit
a411e81e61df ("gpiolib: add hogs support for machine code").

Let me fix that right up.

Bart