]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
powerpc: cmd_ecctest: Use return value of cmd_usage
authorThomas Weber <weber@corscience.de>
Thu, 25 Nov 2010 07:05:30 +0000 (08:05 +0100)
committerWolfgang Denk <wd@denx.de>
Sat, 27 Nov 2010 22:35:14 +0000 (23:35 +0100)
Use the return value of cmd_usage instead of ignoring this
and returning a 1.

Signed-off-by: Thomas Weber <weber@corscience.de>
Acked-by: Mike Frysinger <vapier@gentoo.org>
arch/powerpc/cpu/ppc4xx/cmd_ecctest.c

index fd81b70e7aa4589d2a1f5bb38fd0062d9a0b338c..542ab69a13c9654a56b4b2995569ea7793ebf32c 100644 (file)
@@ -190,15 +190,13 @@ static int do_ecctest(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
        int error;
 
        if (argc < 3) {
-               cmd_usage(cmdtp);
-               return 1;
+               return cmd_usage(cmdtp);
        }
 
        ptr = (u32 *)simple_strtoul(argv[1], NULL, 16);
        error = simple_strtoul(argv[2], NULL, 16);
        if ((error < 1) || (error > 2)) {
-               cmd_usage(cmdtp);
-               return 1;
+               return cmd_usage(cmdtp);
        }
 
        printf("Using address %p for %d bit ECC error injection\n",