]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - common/cmd_flash.c
cfi: Make the flash erase and write operations abortable
[people/ms/u-boot.git] / common / cmd_flash.c
index 0e9b2e3c741e2b534904acf06944b68a044f77c9..e55d366c65d4a3029ebcdd3ecafc4170e609c237 100644 (file)
@@ -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");