diff --git a/drivers/mtd/spi/stmicro.c b/drivers/mtd/spi/stmicro.c
index b43e9f453ac602bb3c26732152ba976d81a91df7..9b910c13fd8b16f13fb92543d07f2e8e859d684e 100644
--- a/drivers/mtd/spi/stmicro.c
+++ b/drivers/mtd/spi/stmicro.c
@@ -133,12 +133,12 @@ static int stmicro_wait_ready(struct spi_flash *flash, unsigned long timeout)
 	struct spi_slave *spi = flash->spi;
 	unsigned long timebase;
 	int ret;
+	u8 cmd = CMD_M25PXX_RDSR;
 	u8 status;
-	u8 cmd[4] = { CMD_M25PXX_RDSR, 0xff, 0xff, 0xff };
 
-	ret = spi_xfer(spi, 32, &cmd[0], NULL, SPI_XFER_BEGIN);
+	ret = spi_xfer(spi, 8, &cmd, NULL, SPI_XFER_BEGIN);
 	if (ret) {
-		debug("SF: Failed to send command %02x: %d\n", cmd[0], ret);
+		debug("SF: Failed to send command %02x: %d\n", cmd, ret);
 		return ret;
 	}