From patchwork Wed Nov 9 19:29:05 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfgang Denk X-Patchwork-Id: 124677 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 518391007DB for ; Thu, 10 Nov 2011 06:32:08 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2A34029187; Wed, 9 Nov 2011 20:30:52 +0100 (CET) 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 v0juHqtvjrzO; Wed, 9 Nov 2011 20:30:51 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D8B6228F8D; Wed, 9 Nov 2011 20:29:45 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 22D3F28B2E for ; Wed, 9 Nov 2011 20:29:28 +0100 (CET) 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 3G7kNobuh6px for ; Wed, 9 Nov 2011 20:29:26 +0100 (CET) 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-out.m-online.net (mail-out.m-online.net [212.18.0.9]) by theia.denx.de (Postfix) with ESMTP id 0A1A028B4A for ; Wed, 9 Nov 2011 20:29:15 +0100 (CET) Received: from frontend1.mail.m-online.net (unknown [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 5864C1C01DFF; Wed, 9 Nov 2011 20:29:14 +0100 (CET) X-Auth-Info: 6iHunxiuWYP3k71+pvnSB1X+jMo8faJUGqDx+YYD02I= Received: from diddl.denx.de (host-80-81-18-216.customer.m-online.net [80.81.18.216]) by smtp-auth.mnet-online.de (Postfix) with ESMTPA id 47AFF1C0007C; Wed, 9 Nov 2011 20:29:14 +0100 (CET) Received: from gemini.denx.de (gemini.denx.de [10.0.0.2]) by diddl.denx.de (Postfix) with ESMTP id E4D47C8CD266; Wed, 9 Nov 2011 20:29:10 +0100 (CET) Received: by gemini.denx.de (Postfix, from userid 500) id 2A3DA140874D; Wed, 9 Nov 2011 20:29:09 +0100 (CET) From: Wolfgang Denk To: u-boot@lists.denx.de Date: Wed, 9 Nov 2011 20:29:05 +0100 Message-Id: <1320866946-28235-12-git-send-email-wd@denx.de> X-Mailer: git-send-email 1.7.6.4 In-Reply-To: <1320866946-28235-1-git-send-email-wd@denx.de> References: <1320866946-28235-1-git-send-email-wd@denx.de> Cc: Reinhard Arlt Subject: [U-Boot] [PATCH 12/13] board/esd/cpci750/cpci750.c: Fix error handling 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 ThE code recorded error conditions but did not pass these on to the higher level caller. Fixing this fixes also this build warning: cpci750.c: In function 'do_loadpci': cpci750.c:569:6: warning: variable 'status' set but not used [-Wunused-but-set-variable] Signed-off-by: Wolfgang Denk Cc: Reinhard Arlt --- board/esd/cpci750/cpci750.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/board/esd/cpci750/cpci750.c b/board/esd/cpci750/cpci750.c index f27d65e..08311c9 100644 --- a/board/esd/cpci750/cpci750.c +++ b/board/esd/cpci750/cpci750.c @@ -566,7 +566,7 @@ int do_loadpci(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) volatile unsigned int *ptr; int count = 0; int count2 = 0; - int status; + int status = 0; char addr[16]; char str[] = "\\|/-"; char *local_args[2]; @@ -622,7 +622,7 @@ int do_loadpci(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) break; } - return 0; + return status; } U_BOOT_CMD(