]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
board/esd/cpci750/cpci750.c: Fix error handling
authorWolfgang Denk <wd@denx.de>
Wed, 9 Nov 2011 09:29:05 +0000 (09:29 +0000)
committerWolfgang Denk <wd@denx.de>
Wed, 16 Nov 2011 20:05:47 +0000 (21:05 +0100)
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 <wd@denx.de>
Cc: Reinhard Arlt <reinhard.arlt@esd-electronics.com>
board/esd/cpci750/cpci750.c

index f27d65ed16509cf723f1d3cfa2376dfcd45ace52..08311c963052d808d30f6d13d149504477e2c16d 100644 (file)
@@ -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(