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 04:07:53 +0200
commit5528a8469fbc01db218fbc00ebec1e3fc088e759 (patch)
tree6a0c4fb612549ab5cd42a11a7cbb45f0c8ec3537 /arch/arm/mach-ep93xx
parentLinux 3.4-rc2 (diff)
downloadlinux-5528a8469fbc01db218fbc00ebec1e3fc088e759.tar.xz
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));
}