summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ep93xx
diff options
context:
space:
mode:
authorRafal Prylowski <prylowski@metasoft.pl>2012-04-05 13:44:07 +0200
committerRyan Mallon <rmallon@gmail.com>2012-04-11 12:07:53 +1000
commit5528a8469fbc01db218fbc00ebec1e3fc088e759 (patch)
tree6a0c4fb612549ab5cd42a11a7cbb45f0c8ec3537 /arch/arm/mach-ep93xx
parent0034102808e0dbbf3a2394b82b1bb40b5778de9e (diff)
downloadlinux-5528a8469fbc01db218fbc00ebec1e3fc088e759.tar.gz
linux-5528a8469fbc01db218fbc00ebec1e3fc088e759.tar.bz2
linux-5528a8469fbc01db218fbc00ebec1e3fc088e759.zip
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.c2
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)
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));
}