Skip to content

Commit e4aec4d

Browse files
andy-shevBartosz Golaszewski
authored andcommitted
gpiolib: Fix the error path order in gpiochip_add_data_with_key()
After shuffling the code, error path wasn't updated correctly. Fix it here. Fixes: 2f4133b ("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>
1 parent 530b1db commit e4aec4d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpio/gpiolib.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -999,11 +999,11 @@ int gpiochip_add_data_with_key(struct gpio_chip *gc, void *data,
999999
gpiochip_irqchip_free_valid_mask(gc);
10001000
err_remove_acpi_chip:
10011001
acpi_gpiochip_remove(gc);
1002+
gpiochip_remove_pin_ranges(gc);
10021003
err_remove_of_chip:
10031004
gpiochip_free_hogs(gc);
10041005
of_gpiochip_remove(gc);
10051006
err_free_gpiochip_mask:
1006-
gpiochip_remove_pin_ranges(gc);
10071007
gpiochip_free_valid_mask(gc);
10081008
err_remove_from_list:
10091009
spin_lock_irqsave(&gpio_lock, flags);

0 commit comments

Comments
 (0)