]> git.sur5r.net Git - u-boot/commitdiff
cmd_onenand.c: Fix command usage help.
authorEnric Balletbo i Serra <eballetbo@iseebcn.com>
Tue, 19 Oct 2010 09:13:21 +0000 (11:13 +0200)
committerWolfgang Denk <wd@denx.de>
Wed, 27 Oct 2010 18:51:22 +0000 (20:51 +0200)
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>
common/cmd_onenand.c

index fe84c3be96b94355758e3c651b5c897c5b7511ca..5550b40b81d8760a8ad41dcf896e9f3e645c7e22 100644 (file)
@@ -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 */