summaryrefslogtreecommitdiff
path: root/common/cmd_demo.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/cmd_demo.c')
-rw-r--r--common/cmd_demo.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/common/cmd_demo.c b/common/cmd_demo.c
index bcb34d9..8a10bdf 100644
--- a/common/cmd_demo.c
+++ b/common/cmd_demo.c
@@ -97,7 +97,9 @@ static int do_demo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
ARRAY_SIZE(demo_commands));
argc -= 2;
argv += 2;
- if (!demo_cmd || argc > demo_cmd->maxargs)
+
+ if ((!demo_cmd || argc > demo_cmd->maxargs) ||
+ ((demo_cmd->name[0] != 'l') && (argc < 1)))
return CMD_RET_USAGE;
if (argc) {