gpiolib: Fix the error path order in gpiochip_add_data_with_key()
[ Upstream commit e4aec4daa8c009057b5e063db1b7322252c92dc8 ]
After shuffling the code, error path wasn't updated correctly.
Fix it here.
Fixes: 2f4133bb5f
("gpiolib: No need to call gpiochip_remove_pin_ranges() twice")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
947baae185
commit
51f7044d10
@@ -763,11 +763,11 @@ err_remove_irqchip_mask:
|
|||||||
gpiochip_irqchip_free_valid_mask(gc);
|
gpiochip_irqchip_free_valid_mask(gc);
|
||||||
err_remove_acpi_chip:
|
err_remove_acpi_chip:
|
||||||
acpi_gpiochip_remove(gc);
|
acpi_gpiochip_remove(gc);
|
||||||
|
gpiochip_remove_pin_ranges(gc);
|
||||||
err_remove_of_chip:
|
err_remove_of_chip:
|
||||||
gpiochip_free_hogs(gc);
|
gpiochip_free_hogs(gc);
|
||||||
of_gpiochip_remove(gc);
|
of_gpiochip_remove(gc);
|
||||||
err_free_gpiochip_mask:
|
err_free_gpiochip_mask:
|
||||||
gpiochip_remove_pin_ranges(gc);
|
|
||||||
gpiochip_free_valid_mask(gc);
|
gpiochip_free_valid_mask(gc);
|
||||||
err_remove_from_list:
|
err_remove_from_list:
|
||||||
spin_lock_irqsave(&gpio_lock, flags);
|
spin_lock_irqsave(&gpio_lock, flags);
|
||||||
|
Reference in New Issue
Block a user