diff options
author | Tom Rini <trini@konsulko.com> | 2023-06-01 11:23:23 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-06-01 11:23:23 -0400 |
commit | f415495e2a261cab52cb03c46a92b7b457728380 (patch) | |
tree | eecf08dd3376548353ec92e67c4ad56215c95fe4 /cmd/legacy-mtd-utils.c | |
parent | e863c7b2854bf9a882939f828023508fb1a1bc16 (diff) | |
parent | 229d689e3c32164875667da282e496b858dbc608 (diff) |
Merge branch '2023-05-31-assorted-fixes-and-improvements' into next
- Makefile logic fixes, address some issues that clang uncovers on ARM,
assorted code cleanups
Diffstat (limited to 'cmd/legacy-mtd-utils.c')
-rw-r--r-- | cmd/legacy-mtd-utils.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cmd/legacy-mtd-utils.c b/cmd/legacy-mtd-utils.c index ac7139f84d6..5903a90fe53 100644 --- a/cmd/legacy-mtd-utils.c +++ b/cmd/legacy-mtd-utils.c @@ -88,6 +88,11 @@ int mtd_arg_off_size(int argc, char *const argv[], int *idx, loff_t *off, return -1; } + if (*size == 0) { + debug("ERROR: Invalid size 0\n"); + return -1; + } + print: printf("device %d ", *idx); if (*size == chipsize) |