diff --git a/commands/edit.c b/commands/edit.c index 9998d765c..ae2fb8c40 100644 --- a/commands/edit.c +++ b/commands/edit.c @@ -380,6 +380,11 @@ static int do_edit(cmd_tbl_t * cmdtp, int argc, char *argv[]) int linepos; char c; + if (argc != 2) { + u_boot_cmd_usage(cmdtp); + return 1; + } + buffer = NULL; if(edit_read_file(argv[1])) return 1;