summaryrefslogtreecommitdiffstats
path: root/sb600spi.c
diff options
context:
space:
mode:
Diffstat (limited to 'sb600spi.c')
-rw-r--r--sb600spi.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sb600spi.c b/sb600spi.c
index 10f1cb7..259ad27 100644
--- a/sb600spi.c
+++ b/sb600spi.c
@@ -63,7 +63,10 @@ int sb600_spi_write_1(struct flashchip *flash, uint8_t *buf)
/* Erase first */
printf("Erasing flash before programming... ");
- flash->erase(flash);
+ if (flash->erase(flash)) {
+ fprintf(stderr, "ERASE FAILED!\n");
+ return -1;
+ }
printf("done.\n");
printf("Programming flash");
OpenPOWER on IntegriCloud