gpio: omap: fix error handling in omap_gpio_irq_type
authorGrygorii Strashko <grygorii.strashko@linaro.org>
Fri, 22 May 2015 14:35:49 +0000 (17:35 +0300)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 1 Jun 2015 14:51:16 +0000 (16:51 +0200)
commit1562e4618ded89b07d145d6985f469fe8be04830
tree24d0116df779b7d32efd61d23697111674e369df
parent5f982c70a7c3382d3532ac6d13fdea48ab38b934
gpio: omap: fix error handling in omap_gpio_irq_type

The GPIO bank will be kept powered in case if input parameters
are invalid or error occurred in omap_gpio_irq_type.

Hence, fix it by ensuring that GPIO bank will be unpowered
in case of errors and add additional check of value returned
from omap_set_gpio_triggering().

Signed-off-by: Grygorii Strashko <grygorii.strashko@linaro.org>
Tested-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-omap.c