diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index b27c1a28a7cadb6ad2c9773bff96fe4728ac22d1..8b1f412144cfee13dae4e2065e632d6ff96df13d 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -689,7 +689,7 @@ static void sdhci_prepare_data(struct sdhci_host *host, struct mmc_data *data)
 				WARN_ON(1);
 				host->flags &= ~SDHCI_USE_DMA;
 			} else {
-				WARN_ON(count != 1);
+				WARN_ON(sg_cnt != 1);
 				writel(sg_dma_address(data->sg),
 					host->ioaddr + SDHCI_DMA_ADDRESS);
 			}