From mboxrd@z Thu Jan 1 00:00:00 1970 From: Fabio Estevam Date: Sat, 9 Apr 2011 17:43:24 -0300 Subject: [U-Boot] [PATCH] gpio: imx: Fix return value on error Message-ID: <1302381804-3416-1-git-send-email-festevam@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Signed-off-by: Fabio Estevam --- drivers/gpio/mxc_gpio.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpio/mxc_gpio.c b/drivers/gpio/mxc_gpio.c index 53a0673..dcf114a 100644 --- a/drivers/gpio/mxc_gpio.c +++ b/drivers/gpio/mxc_gpio.c @@ -52,7 +52,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; @@ -100,7 +100,7 @@ int mxc_gpio_get(unsigned int gpio) u32 l; if (port >= ARRAY_SIZE(gpio_ports)) - return -1; + return -EINVAL; gpio &= 0x1f; -- 1.6.0.4