diff options
Diffstat (limited to 'common/cmd_flash.c')
-rw-r--r-- | common/cmd_flash.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/common/cmd_flash.c b/common/cmd_flash.c index 0e9b2e3c74..e55d366c65 100644 --- a/common/cmd_flash.c +++ b/common/cmd_flash.c @@ -443,7 +443,8 @@ int flash_sect_erase (ulong addr_first, ulong addr_last) rcode = flash_erase (info, s_first[bank], s_last[bank]); } } - printf ("Erased %d sectors\n", erased); + if (rcode == 0) + printf("Erased %d sectors\n", erased); } else if (rcode == 0) { puts ("Error: start and/or end address" " not on sector boundary\n"); |