diff --git a/cli_classic.c b/cli_classic.c
index 73ab57a..945ad7b 100644
--- a/cli_classic.c
+++ b/cli_classic.c
@@ -91,7 +91,6 @@
 
 int main(int argc, char *argv[])
 {
-	unsigned long size;
 	/* Probe for up to three flash chips. */
 	const struct flashchip *chip = NULL;
 	struct flashctx flashes[6] = {{0}};
@@ -501,9 +500,18 @@
 
 	print_chip_support_status(fill_flash->chip);
 
-	size = fill_flash->chip->total_size * 1024;
-	if (check_max_decode(fill_flash->mst->buses_supported & fill_flash->chip->bustype, size) && (!force)) {
-		msg_cerr("Chip is too big for this programmer (-V gives details). Use --force to override.\n");
+	unsigned int limitexceeded = count_max_decode_exceedings(fill_flash);
+	if (limitexceeded > 0 && !force) {
+		enum chipbustype commonbuses = fill_flash->mst->buses_supported & fill_flash->chip->bustype;
+
+		/* Sometimes chip and programmer have more than one bus in common,
+		 * and the limit is not exceeded on all buses. Tell the user. */
+		if ((bitcount(commonbuses) > limitexceeded)) {
+			msg_pdbg("There is at least one interface available which could support the size of\n"
+				 "the selected flash chip.\n");
+		}
+		msg_cerr("This flash chip is too big for this programmer (--verbose/-V gives details).\n"
+			 "Use --force/-f to override at your own risk.\n");
 		ret = 1;
 		goto out_shutdown;
 	}
diff --git a/flashrom.c b/flashrom.c
index eeed90b..93b292b 100644
--- a/flashrom.c
+++ b/flashrom.c
@@ -1009,9 +1009,13 @@
 	return 0;
 }
 
-int check_max_decode(enum chipbustype buses, uint32_t size)
+/* Returns the number of busses commonly supported by the current programmer and flash chip where the latter
+ * can not be completely accessed due to size/address limits of the programmer. */
+unsigned int count_max_decode_exceedings(const struct flashctx *flash)
 {
-	int limitexceeded = 0;
+	unsigned int limitexceeded = 0;
+	uint32_t size = flash->chip->total_size * 1024;
+	enum chipbustype buses = flash->mst->buses_supported & flash->chip->bustype;
 
 	if ((buses & BUS_PARALLEL) && (max_rom_decode.parallel < size)) {
 		limitexceeded++;
@@ -1045,17 +1049,7 @@
 			 "probe/read/erase/write may fail. ", size / 1024,
 			 max_rom_decode.spi / 1024, "SPI");
 	}
-	if (!limitexceeded)
-		return 0;
-	/* Sometimes chip and programmer have more than one bus in common,
-	 * and the limit is not exceeded on all buses. Tell the user.
-	 */
-	if (bitcount(buses) > limitexceeded)
-		/* FIXME: This message is designed towards CLI users. */
-		msg_pdbg("There is at least one common chip/programmer "
-			 "interface which can support a chip of this size. "
-			 "You can try --force at your own risk.\n");
-	return 1;
+	return limitexceeded;
 }
 
 int probe_flash(struct registered_master *mst, int startchip, struct flashctx *flash, int force)
@@ -1079,9 +1073,6 @@
 			continue;
 		}
 
-		size = chip->total_size * 1024;
-		check_max_decode(buses_common, size);
-
 		/* Start filling in the dynamic data. */
 		flash->chip = calloc(1, sizeof(struct flashchip));
 		if (!flash->chip) {
@@ -1091,6 +1082,7 @@
 		memcpy(flash->chip, chip, sizeof(struct flashchip));
 		flash->mst = mst;
 
+		size = flash->chip->total_size * 1024;
 		base = flashbase ? flashbase : (0xffffffff - size + 1);
 		flash->virtual_memory = (chipaddr)programmer_map_flash_region("flash chip", base, size);
 
diff --git a/programmer.h b/programmer.h
index 62acfeb..ab0d844 100644
--- a/programmer.h
+++ b/programmer.h
@@ -513,7 +513,7 @@
 extern struct decode_sizes max_rom_decode;
 extern int programmer_may_write;
 extern unsigned long flashbase;
-int check_max_decode(enum chipbustype buses, uint32_t size);
+unsigned int count_max_decode_exceedings(const struct flashctx *flash);
 char *extract_programmer_param(const char *param_name);
 
 /* spi.c */
