summaryrefslogtreecommitdiffstats
path: root/wbsio_spi.c
diff options
context:
space:
mode:
Diffstat (limited to 'wbsio_spi.c')
-rw-r--r--wbsio_spi.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/wbsio_spi.c b/wbsio_spi.c
index dce6631a9..8ca0abcb7 100644
--- a/wbsio_spi.c
+++ b/wbsio_spi.c
@@ -196,7 +196,10 @@ int wbsio_spi_write_1(struct flashchip *flash, uint8_t *buf)
return 1;
}
- flash->erase(flash);
+ if (flash->erase(flash)) {
+ fprintf(stderr, "ERASE FAILED!\n");
+ return -1;
+ }
result = spi_write_enable();
if (result)
return result;