diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index 217f90c473df35d2cd32820cbe40760e320945af..bf87612d5be565f6d22e9b486536241c6b63b986 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -221,7 +221,7 @@ static int mmc_fill_device_info(void)
 	unsigned int speed_idx;
 	unsigned int nb_blocks;
 	unsigned int freq_unit;
-	int ret;
+	int ret = 0;
 	struct mmc_csd_sd_v2 *csd_sd_v2;
 
 	switch (mmc_dev_info->mmc_dev_type) {