Commit 92771cdd authored by William Qiu's avatar William Qiu Committed by Ulf Hansson

mmc: dw_mmc-starfive: Fix initialization of prev_err

Fix a bug by making sure prev_err doesn't get used when being
uninitialized.
Signed-off-by: default avatarWilliam Qiu <william.qiu@starfivetech.com>
Reported-by: default avatarDan Carpenter <error27@gmail.com>
Reviewed-by: default avatarEmil Renner Berthing <emil.renner.berthing@canonical.com>
Fixes: 9e622229 ("mmc: starfive: Add sdio/emmc driver support")
Link: https://lore.kernel.org/r/20230307024646.10216-3-william.qiu@starfivetech.comSigned-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent 11440da7
...@@ -51,7 +51,7 @@ static int dw_mci_starfive_execute_tuning(struct dw_mci_slot *slot, ...@@ -51,7 +51,7 @@ static int dw_mci_starfive_execute_tuning(struct dw_mci_slot *slot,
struct dw_mci *host = slot->host; struct dw_mci *host = slot->host;
struct starfive_priv *priv = host->priv; struct starfive_priv *priv = host->priv;
int rise_point = -1, fall_point = -1; int rise_point = -1, fall_point = -1;
int err, prev_err; int err, prev_err = 0;
int i; int i;
bool found = 0; bool found = 0;
u32 regval; u32 regval;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment