mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-27 12:57:53 +00:00
gpiolib: Fix the error path order in gpiochip_add_data_with_key()
[ Upstream commite4aec4daa8
] 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:
parent
c21b5ad4e7
commit
ea514ac5f1
1 changed files with 1 additions and 1 deletions
|
@ -805,11 +805,11 @@ int gpiochip_add_data_with_key(struct gpio_chip *gc, void *data,
|
|||
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);
|
||||
err_free_gpiochip_mask:
|
||||
gpiochip_remove_pin_ranges(gc);
|
||||
gpiochip_free_valid_mask(gc);
|
||||
if (gdev->dev.release) {
|
||||
/* release() has been registered by gpiochip_setup_dev() */
|
||||
|
|
Loading…
Reference in a new issue