Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5528a846 authored by Rafal Prylowski's avatar Rafal Prylowski Committed by Ryan Mallon
Browse files

arm: ep93xx: Don't try to release not acquired GPIO lines



Fail path of ep93xx_keypad_acquire_gpio() tries to release
GPIO lines not acquired successfully before. Fix this.

Signed-off-by: default avatarRafal Prylowski <prylowski@metasoft.pl>
Acked-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: default avatarRyan Mallon <rmallon@gmail.com>
parent 00341028
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -734,7 +734,7 @@ int ep93xx_keypad_acquire_gpio(struct platform_device *pdev)
fail_gpio_d:
	gpio_free(EP93XX_GPIO_LINE_C(i));
fail_gpio_c:
	for ( ; i >= 0; --i) {
	for (--i; i >= 0; --i) {
		gpio_free(EP93XX_GPIO_LINE_C(i));
		gpio_free(EP93XX_GPIO_LINE_D(i));
	}