diff --git a/flashrom.c b/flashrom.c
index 5bf9645..12a51ad 100644
--- a/flashrom.c
+++ b/flashrom.c
@@ -465,6 +465,8 @@
  */
 static int may_register_shutdown = 0;
 
+static int check_block_eraser(const struct flashchip *flash, int k, int log);
+
 /* Register a function to be executed on programmer shutdown.
  * The advantage over atexit() is that you can supply a void pointer which will
  * be used as parameter to the registered function upon programmer shutdown.
@@ -711,6 +713,19 @@
 	return extract_param(&programmer_param, param_name, ",");
 }
 
+/* Returns the number of well-defined erasers for a chip.
+ * The log parameter controls output. */
+static unsigned int count_usable_erasers(const struct flashchip *flash, int log)
+{
+	unsigned int usable_erasefunctions = 0;
+	int k;
+	for (k = 0; k < NUM_ERASEFUNCTIONS; k++) {
+		if (!check_block_eraser(flash, k, 0))
+			usable_erasefunctions++;
+	}
+	return usable_erasefunctions;
+}
+
 /* start is an offset to the base address of the flash chip */
 int check_erased_range(struct flashchip *flash, int start, int len)
 {
@@ -1467,7 +1482,7 @@
 	return 0;
 }
 
-static int check_block_eraser(struct flashchip *flash, int k, int log)
+static int check_block_eraser(const struct flashchip *flash, int k, int log)
 {
 	struct block_eraser eraser = flash->block_erasers[k];
 
@@ -1496,18 +1511,9 @@
 	int k, ret = 0;
 	uint8_t *curcontents;
 	unsigned long size = flash->total_size * 1024;
-	int usable_erasefunctions = 0;
+	unsigned int usable_erasefunctions = count_usable_erasers(flash, 0);
 
-	for (k = 0; k < NUM_ERASEFUNCTIONS; k++)
-		if (!check_block_eraser(flash, k, 0))
-			usable_erasefunctions++;
 	msg_cinfo("Erasing and writing flash chip... ");
-	if (!usable_erasefunctions) {
-		msg_cerr("ERROR: flashrom has no erase function for this flash "
-			 "chip.\n");
-		return 1;
-	}
-
 	curcontents = (uint8_t *) malloc(size);
 	/* Copy oldcontents to curcontents to avoid clobbering oldcontents. */
 	memcpy(curcontents, oldcontents, size);
@@ -1825,7 +1831,11 @@
 				return 1;
 			msg_cerr("Continuing anyway.\n");
 		}
-		/* FIXME: Check if at least one erase function exists. */
+		if(count_usable_erasers(flash, 0) == 0) {
+			msg_cerr("flashrom has no erase function for this "
+				 "flash chip.\n");
+			return 1;
+		}
 	}
 	if (write_it) {
 		if (flash->tested & TEST_BAD_WRITE) {
