@@ -659,11 +659,12 @@ static int do_nand(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
}
size = mtd->erasesize;
- if (argc > 3)
+ if (argc > 3) {
if (!str2off(argv[3], &size)) {
puts("Size is not a valid number\n");
return 1;
}
+ }
endoff = off + size;
if (endoff > mtd->size) {
@@ -803,7 +804,7 @@ static char nand_help_text[] =
"nand dump[.oob] off - dump page\n"
#ifdef CONFIG_CMD_NAND_TORTURE
"nand torture off - torture one block at offset\n"
- "nand torture off size - torture blocks from off to off+size\n"
+ "nand torture off [size] - torture blocks from off to off+size\n"
#endif
"nand scrub [-y] off size | scrub.part partition | scrub.chip\n"
" really clean NAND erasing bad blocks (UNSAFE)\n"