summaryrefslogtreecommitdiffstats
path: root/flashrom.c
diff options
context:
space:
mode:
Diffstat (limited to 'flashrom.c')
-rw-r--r--flashrom.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/flashrom.c b/flashrom.c
index 5764872..cb0da72 100644
--- a/flashrom.c
+++ b/flashrom.c
@@ -851,12 +851,17 @@ int main(int argc, char *argv[])
fprintf(stderr, "Error: flashrom has no write function for this flash chip.\n");
return 1;
}
- ret |= flash->write(flash, buf);
- if (!ret) printf("COMPLETE.\n");
+ ret = flash->write(flash, buf);
+ if (ret) {
+ fprintf(stderr, "FAILED!\n");
+ return 1;
+ } else {
+ printf("COMPLETE.\n");
+ }
}
if (verify_it)
- ret |= verify_flash(flash, buf);
+ ret = verify_flash(flash, buf);
programmer_shutdown();
OpenPOWER on IntegriCloud