kw_gpio: fix error in kw_gpio_direction_input
The function kw_gpio_is_valid returns zero on success, so
adapt the error check accordingly.
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
cc: Prafulla Wadaskar <prafulla@marvell.com>
cc: Dieter Kiermaier <dk-arm-linux@gmx.de>
diff --git a/drivers/gpio/kw_gpio.c b/drivers/gpio/kw_gpio.c
index 56383c2..2de179e 100644
--- a/drivers/gpio/kw_gpio.c
+++ b/drivers/gpio/kw_gpio.c
@@ -109,7 +109,7 @@
*/
int kw_gpio_direction_input(unsigned pin)
{
- if (!kw_gpio_is_valid(pin, GPIO_INPUT_OK))
+ if (kw_gpio_is_valid(pin, GPIO_INPUT_OK) != 0)
return 1;
/* Configure GPIO direction. */