cmd: blkcache: simplify sub-command handling
authorEric Nelson <eric@nelint.com>
Sat, 2 Apr 2016 14:37:13 +0000 (07:37 -0700)
committerTom Rini <trini@konsulko.com>
Mon, 11 Apr 2016 16:44:38 +0000 (12:44 -0400)
Signed-off-by: Eric Nelson <eric@nelint.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
cmd/blkcache.c

index a3dd549a9d282064085101b6fd25b20024655a2a..d7afe3eff8aa5e87243151e85aa2ebc76e98672b 100644 (file)
@@ -73,12 +73,10 @@ static int do_blkcache(cmd_tbl_t *cmdtp, int flag,
 
        c = find_cmd_tbl(argv[0], &cmd_blkc_sub[0], ARRAY_SIZE(cmd_blkc_sub));
 
-       if (c)
-               return c->cmd(cmdtp, flag, argc, argv);
-       else
+       if (!c)
                return CMD_RET_USAGE;
 
-       return 0;
+       return c->cmd(cmdtp, flag, argc, argv);
 }
 
 U_BOOT_CMD(