summaryrefslogtreecommitdiffstats
path: root/flashrom.c
diff options
context:
space:
mode:
Diffstat (limited to 'flashrom.c')
-rw-r--r--flashrom.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/flashrom.c b/flashrom.c
index 6979d84..13dd581 100644
--- a/flashrom.c
+++ b/flashrom.c
@@ -1400,6 +1400,10 @@ static int erase_and_write_block_helper(struct flashchip *flash,
ret = erasefn(flash, start, len);
if (ret)
return ret;
+ if (check_erased_range(flash, start, len)) {
+ msg_cerr("ERASE FAILED!\n");
+ return -1;
+ }
/* Erase was successful. Adjust curcontents. */
memset(curcontents, 0xff, len);
skip = 0;
OpenPOWER on IntegriCloud