--- a/jedec.c
+++ b/jedec.c
@@ -302,7 +302,9 @@
 	const unsigned int mask = getaddrmask(flash->chip);
 	unsigned int delay_us = (flash->chip->probe_timing == TIMING_ZERO) ? 0 : 10;
 
-	if (!operand)
+	/* Offset zero is a valid sector/block target. Only the setup and
+	 * whole-chip commands use the unlock address for their final cycle. */
+	if (op == JEDEC_CMD_ERASE || op == JEDEC_CMD_ERASE_CHIP)
 		operand = (shifted ? JEDEC_UNLOCK_ADDR2 : JEDEC_UNLOCK_ADDR1) & mask;
 
 	chip_writeb(flash, JEDEC_UNLOCK_DATA1, bios + ((shifted ? JEDEC_UNLOCK_ADDR2 : JEDEC_UNLOCK_ADDR1) & mask));
