From: Eric Nelson Date: Sat, 2 Apr 2016 14:37:13 +0000 (-0700) Subject: cmd: blkcache: simplify sub-command handling X-Git-Tag: v2016.05-rc1~20 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=195c94a24071fa6be913219e0d98bb210b06ccb5;p=u-boot cmd: blkcache: simplify sub-command handling Signed-off-by: Eric Nelson Acked-by: Stephen Warren --- diff --git a/cmd/blkcache.c b/cmd/blkcache.c index a3dd549a9d..d7afe3eff8 100644 --- a/cmd/blkcache.c +++ b/cmd/blkcache.c @@ -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(