diff options
author | Wolfram Sang <[email protected]> | 2021-11-30 14:23:09 +0100 |
---|---|---|
committer | Ulf Hansson <[email protected]> | 2021-11-30 16:09:55 +0100 |
commit | 7dba402807a85fa3723f4a27504813caf81cc9d7 (patch) | |
tree | 3e9453b7a1d5d8c7533263e74431a07d810a9667 | |
parent | d58071a8a76d779eedab38033ae4c821c30295a5 (diff) |
mmc: renesas_sdhi: initialize variable properly when tuning
'cmd_error' is not necessarily initialized on some error paths in
mmc_send_tuning(). Initialize it.
Fixes: 2c9017d0b5d3 ("mmc: renesas_sdhi: abort tuning when timeout detected")
Reported-by: Dan Carpenter <[email protected]>
Signed-off-by: Wolfram Sang <[email protected]>
Cc: [email protected]
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Ulf Hansson <[email protected]>
-rw-r--r-- | drivers/mmc/host/renesas_sdhi_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/renesas_sdhi_core.c index a4407f391f66..f5b2684ad805 100644 --- a/drivers/mmc/host/renesas_sdhi_core.c +++ b/drivers/mmc/host/renesas_sdhi_core.c @@ -673,7 +673,7 @@ static int renesas_sdhi_execute_tuning(struct mmc_host *mmc, u32 opcode) /* Issue CMD19 twice for each tap */ for (i = 0; i < 2 * priv->tap_num; i++) { - int cmd_error; + int cmd_error = 0; /* Set sampling clock position */ sd_scc_write32(host, priv, SH_MOBILE_SDHI_SCC_TAPSET, i % priv->tap_num); |