Re: [PATCH v1 1/1] gpiolib: Fix the error path order in gpiochip_add_data_with_key()

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

 



On Thu, Feb 22, 2024 at 10:37:06AM +0100, Bartosz Golaszewski wrote:
> On Wed, Feb 21, 2024 at 8:28 PM Andy Shevchenko
> <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:
> >
> > After shuffling the code, error path wasn't updated correctly.
> > Fix it here.

> >         gpiochip_irqchip_free_valid_mask(gc);
> >  err_remove_acpi_chip:
> >         acpi_gpiochip_remove(gc);
> > +       gpiochip_remove_pin_ranges(gc);
> >  err_remove_of_chip:
> >         gpiochip_free_hogs(gc);
> >         of_gpiochip_remove(gc);
> 
> This undoes machine_gpiochip_add() and I think it also needs to be
> moved before acpi_gpiochip_remove().

You mean it should be like

       gpiochip_irqchip_free_valid_mask(gc);
       gpiochip_free_hogs(gc);
err_remove_acpi_chip:
       acpi_gpiochip_remove(gc);
       gpiochip_remove_pin_ranges(gc);
err_remove_of_chip:
       of_gpiochip_remove(gc);

?

-- 
With Best Regards,
Andy Shevchenko






[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