提交 5528a846 编写于 作者: R Rafal Prylowski 提交者: Ryan Mallon

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: NRafal Prylowski <prylowski@metasoft.pl>
Acked-by: NH Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: NRyan Mallon <rmallon@gmail.com>
上级 00341028
......@@ -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));
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册