Skip to content
Snippets Groups Projects
Commit e53bcd94 authored by Fabio Estevam's avatar Fabio Estevam Committed by Albert ARIBAUD
Browse files

gpio: imx: Fix return value on error

parent b73850f7
No related branches found
No related tags found
No related merge requests found
......@@ -24,6 +24,7 @@
#include <asm/arch/imx-regs.h>
#include <asm/io.h>
#include <mxc_gpio.h>
#include <errno.h>
/* GPIO port description */
static unsigned long gpio_ports[] = {
......@@ -47,7 +48,7 @@ int mxc_gpio_direction(unsigned int gpio, enum mxc_gpio_direction direction)
u32 l;
if (port >= ARRAY_SIZE(gpio_ports))
return 1;
return -EINVAL;
gpio &= 0x1f;
......@@ -95,7 +96,7 @@ int mxc_gpio_get(unsigned int gpio)
u32 l;
if (port >= ARRAY_SIZE(gpio_ports))
return -1;
return -EINVAL;
gpio &= 0x1f;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment