diff mbox series

mmc: initialize an err variable

Message ID 20201203213600.26381-1-jh80.chung@samsung.com
State Accepted
Delegated to: Peng Fan
Headers show
Series mmc: initialize an err variable | expand

Commit Message

Jaehoon Chung Dec. 3, 2020, 9:36 p.m. UTC
Initialize an err variable to 0.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
---
 drivers/mmc/mmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Tom Rini Dec. 7, 2020, 10:10 p.m. UTC | #1
On Fri, Dec 04, 2020 at 06:36:00AM +0900, Jaehoon Chung wrote:

> 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>
Jaehoon Chung Feb. 18, 2021, 12:19 a.m. UTC | #2
On 12/8/20 7:10 AM, Tom Rini wrote:
> On Fri, Dec 04, 2020 at 06:36:00AM +0900, Jaehoon Chung wrote:
> 
>> 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>

Ping. Is there any progress about this patch?

Best Regards,
Jaehoon Chung

>
diff mbox series

Patch

diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index a6394bcf308f..5151339d3aa3 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;