From 57ff9f2421244db4f27649d1e13393d2b85f224d Mon Sep 17 00:00:00 2001 From: Enric Balletbo i Serra Date: Tue, 19 Oct 2010 11:13:21 +0200 Subject: [PATCH] cmd_onenand.c: Fix command usage help. Running the onenand command without arguments does nothing, with this patch shows the command usage. Signed-off-by: Enric Balletbo i Serra --- common/cmd_onenand.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/cmd_onenand.c b/common/cmd_onenand.c index fe84c3be96..5550b40b81 100644 --- a/common/cmd_onenand.c +++ b/common/cmd_onenand.c @@ -535,6 +535,9 @@ static int do_onenand(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[] { cmd_tbl_t *c; + if (argc < 2) + return cmd_usage(cmdtp); + mtd = &onenand_mtd; /* Strip off leading 'onenand' command argument */ -- 2.39.5