If writing failed, verifying is pointless

Abort instead.

Corresponding to flashrom svn r666.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Oliver Niesner <oli@rhce.servebbs.net>
diff --git a/flashrom.c b/flashrom.c
index 5764872..cb0da72 100644
--- a/flashrom.c
+++ b/flashrom.c
@@ -851,12 +851,17 @@
 			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();