]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - common/cmd_bootm.c
cmd_usage(): simplify return code handling
[people/ms/u-boot.git] / common / cmd_bootm.c
index bf77fb463d3421a6cc20e9b72b5715ac24d60176..adfa6cd18aea82bca910165c79295d73f6a3d0d8 100644 (file)
@@ -491,17 +491,14 @@ int do_bootm_subcommand (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv
                        argv++;
                        return bootm_start(cmdtp, flag, argc, argv);
                }
-       }
-       /* Unrecognized command */
-       else {
-               cmd_usage(cmdtp);
-               return 1;
+       } else {
+               /* Unrecognized command */
+               return cmd_usage(cmdtp);
        }
 
        if (images.state >= state) {
                printf ("Trying to execute a command out of order\n");
-               cmd_usage(cmdtp);
-               return 1;
+               return cmd_usage(cmdtp);
        }
 
        images.state |= state;