u32 src_ptr;
char *endp;
+ if (argc != cmdtp->maxargs)
+ return CMD_RET_FAILURE;
+
src_ptr = simple_strtoul(argv[2], &endp, 16);
if (*argv[2] == 0 || *endp != 0)
return CMD_RET_USAGE;
+
if (zynq_verify_image(src_ptr))
return CMD_RET_FAILURE;
u32 srcaddr, srclen, dstaddr, dstlen;
int status;
+ if (argc < 5 && argc > cmdtp->maxargs)
+ return CMD_RET_USAGE;
+
srcaddr = simple_strtoul(argv[2], &endp, 16);
if (*argv[2] == 0 || *endp != 0)
return CMD_RET_USAGE;
return CMD_RET_USAGE;
zynq_cmd = find_cmd_tbl(argv[1], zynq_commands,
ARRAY_SIZE(zynq_commands));
- if (!zynq_cmd || argc != zynq_cmd->maxargs)
+ if (!zynq_cmd)
return CMD_RET_USAGE;
ret = zynq_cmd->cmd(zynq_cmd, flag, argc, argv);