From: Wolfgang Denk Date: Wed, 9 Nov 2011 09:29:05 +0000 (+0000) Subject: board/esd/cpci750/cpci750.c: Fix error handling X-Git-Tag: v2011.12-rc1~202 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=be51c5c98b8d705a1795d00668344cfade8d6545;p=u-boot board/esd/cpci750/cpci750.c: Fix error handling 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 --- diff --git a/board/esd/cpci750/cpci750.c b/board/esd/cpci750/cpci750.c index f27d65ed16..08311c9630 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(