]> git.sur5r.net Git - u-boot/commitdiff
gdsys: osd: Use return value of cmd_usage
authorThomas Weber <weber@corscience.de>
Thu, 25 Nov 2010 07:05:29 +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>
board/gdsys/common/osd.c

index 05800ffba487bb2b895eabc13030b7ce29ccf38d..239c870eff76ebfec29cfafe6a72c88cd69208aa 100644 (file)
@@ -142,8 +142,7 @@ static int osd_print(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
        char *text;
 
        if (argc < 5) {
-               cmd_usage(cmdtp);
-               return 1;
+               return cmd_usage(cmdtp);
        }
 
        x = simple_strtoul(argv[1], NULL, 16);
@@ -204,8 +203,7 @@ int osd_write(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
        unsigned count = (argc > 4) ?  simple_strtoul(argv[4], NULL, 16) : 1;
 
        if ((argc < 4) || (strlen(argv[3]) % 4)) {
-               cmd_usage(cmdtp);
-               return 1;
+               return cmd_usage(cmdtp);
        }
 
        x = simple_strtoul(argv[1], NULL, 16);