[U-Boot] [PATCH 2/3] cmd: blkcache: simplify sub-command handling

Eric Nelson eric at nelint.com
Sat Apr 2 16:37:13 CEST 2016


Signed-off-by: Eric Nelson <eric at nelint.com>
---
 cmd/blkcache.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/cmd/blkcache.c b/cmd/blkcache.c
index d97bed5..1338dbd 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(
-- 
2.6.2



More information about the U-Boot mailing list