From: Jaehoon Chung <jh80.chung@samsung.com>
Date: Thu, 3 Dec 2020 21:36:00 +0000 (+0900)
Subject: mmc: initialize an err variable
X-Git-Tag: v2025.01-rc5-pxa1908~2003^2~12
X-Git-Url: http://git.dujemihanovic.xyz/html/static/%7B%7B%20.Permalink%20%7D%7D?a=commitdiff_plain;h=52ff04a216287e1e36d4a3ac977867412b91df45;p=u-boot.git

mmc: initialize an err variable

Initialize an err variable to 0.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Reported-by: Coverity (CID: 313548)
Reviewed-by: Tom Rini <trini@konsulko.com>
---

diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index 36aab50f64..d67af80c01 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -2062,7 +2062,7 @@ static int mmc_select_hs400es(struct mmc *mmc)
 
 static int mmc_select_mode_and_width(struct mmc *mmc, uint card_caps)
 {
-	int err;
+	int err = 0;
 	const struct mode_width_tuning *mwt;
 	const struct ext_csd_bus_width *ecbw;