MX28: Fix MXSBOOT segfault if no params specified

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
This commit is contained in:
Marek Vasut 2011-12-22 09:55:08 +00:00 committed by Albert ARIBAUD
parent bd2e27c043
commit e364daf925

View file

@ -606,6 +606,9 @@ int parse_ops(int argc, char **argv)
};
int type;
if (argc < 4)
return -1;
for (i = 1; i < argc; i++) {
if (!strncmp(argv[i], "-w", 2))
type = PARAM_WRITE;