Skip to content

Commit

Permalink
arm: ep93xx: Don't try to release not acquired GPIO lines
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Rafal Prylowski authored and Ryan Mallon committed Apr 11, 2012
1 parent 0034102 commit 5528a84
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/arm/mach-ep93xx/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
Expand Down

0 comments on commit 5528a84

Please sign in to comment.