From patchwork Sat Apr 9 20:43:24 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 90487 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 49020B6F17 for ; Sun, 10 Apr 2011 06:43:43 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6A4AF280D5; Sat, 9 Apr 2011 22:43:41 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 79fp+Y4dq2st; Sat, 9 Apr 2011 22:43:41 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 60A1A280C0; Sat, 9 Apr 2011 22:43:39 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id F1B68280C0 for ; Sat, 9 Apr 2011 22:43:37 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BYdYMeUBaptf for ; Sat, 9 Apr 2011 22:43:37 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-yx0-f172.google.com (mail-yx0-f172.google.com [209.85.213.172]) by theia.denx.de (Postfix) with ESMTPS id 07E2C280BF for ; Sat, 9 Apr 2011 22:43:35 +0200 (CEST) Received: by yxk30 with SMTP id 30so1774547yxk.3 for ; Sat, 09 Apr 2011 13:43:33 -0700 (PDT) Received: by 10.150.115.14 with SMTP id n14mr3553079ybc.293.1302381813350; Sat, 09 Apr 2011 13:43:33 -0700 (PDT) Received: from localhost.localdomain ([201.82.76.9]) by mx.google.com with ESMTPS id x4sm2012271ybl.23.2011.04.09.13.43.31 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 09 Apr 2011 13:43:32 -0700 (PDT) From: Fabio Estevam To: u-boot@lists.denx.de Date: Sat, 9 Apr 2011 17:43:24 -0300 Message-Id: <1302381804-3416-1-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 1.6.0.4 Cc: Fabio Estevam , Fabio Estevam Subject: [U-Boot] [PATCH] gpio: imx: Fix return value on error X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@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;