summaryrefslogtreecommitdiff
path: root/common/cmd_onenand.c
diff options
context:
space:
mode:
authorEnric Balletbo i Serra <eballetbo@iseebcn.com>2010-10-19 11:13:21 +0200
committerWolfgang Denk <wd@denx.de>2010-10-27 20:51:22 +0200
commit57ff9f2421244db4f27649d1e13393d2b85f224d (patch)
tree27829ae45a0a288f39f09ec033813430f59dae6d /common/cmd_onenand.c
parent0158126e252b6860e7a7d8408d0872278a3483cf (diff)
downloadu-boot-imx-57ff9f2421244db4f27649d1e13393d2b85f224d.zip
u-boot-imx-57ff9f2421244db4f27649d1e13393d2b85f224d.tar.gz
u-boot-imx-57ff9f2421244db4f27649d1e13393d2b85f224d.tar.bz2
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 <eballetbo@iseebcn.com>
Diffstat (limited to 'common/cmd_onenand.c')
-rw-r--r--common/cmd_onenand.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/common/cmd_onenand.c b/common/cmd_onenand.c
index fe84c3b..5550b40 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 */