diff options
author | Rafal Prylowski <prylowski@metasoft.pl> | 2012-04-05 07:44:07 -0400 |
---|---|---|
committer | Ryan Mallon <rmallon@gmail.com> | 2012-04-10 22:07:53 -0400 |
commit | 5528a8469fbc01db218fbc00ebec1e3fc088e759 (patch) | |
tree | 6a0c4fb612549ab5cd42a11a7cbb45f0c8ec3537 /arch/arm/mach-ep93xx | |
parent | 0034102808e0dbbf3a2394b82b1bb40b5778de9e (diff) |
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: Rafal Prylowski <prylowski@metasoft.pl>
Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Ryan Mallon <rmallon@gmail.com>
Diffstat (limited to 'arch/arm/mach-ep93xx')
-rw-r--r-- | arch/arm/mach-ep93xx/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c index 8d2589588713..2ea2ffc61875 100644 --- a/arch/arm/mach-ep93xx/core.c +++ b/arch/arm/mach-ep93xx/core.c | |||
@@ -734,7 +734,7 @@ int ep93xx_keypad_acquire_gpio(struct platform_device *pdev) | |||
734 | fail_gpio_d: | 734 | fail_gpio_d: |
735 | gpio_free(EP93XX_GPIO_LINE_C(i)); | 735 | gpio_free(EP93XX_GPIO_LINE_C(i)); |
736 | fail_gpio_c: | 736 | fail_gpio_c: |
737 | for ( ; i >= 0; --i) { | 737 | for (--i; i >= 0; --i) { |
738 | gpio_free(EP93XX_GPIO_LINE_C(i)); | 738 | gpio_free(EP93XX_GPIO_LINE_C(i)); |
739 | gpio_free(EP93XX_GPIO_LINE_D(i)); | 739 | gpio_free(EP93XX_GPIO_LINE_D(i)); |
740 | } | 740 | } |