Skip to content

Commit 92771cd

Browse files
littleqypUlf Hansson
authored andcommitted
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: William Qiu <william.qiu@starfivetech.com> Reported-by: Dan Carpenter <error27@gmail.com> Reviewed-by: Emil Renner Berthing <emil.renner.berthing@canonical.com> Fixes: 9e62222 ("mmc: starfive: Add sdio/emmc driver support") Link: https://lore.kernel.org/r/20230307024646.10216-3-william.qiu@starfivetech.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
1 parent 11440da commit 92771cd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/mmc/host/dw_mmc-starfive.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ static int dw_mci_starfive_execute_tuning(struct dw_mci_slot *slot,
5151
struct dw_mci *host = slot->host;
5252
struct starfive_priv *priv = host->priv;
5353
int rise_point = -1, fall_point = -1;
54-
int err, prev_err;
54+
int err, prev_err = 0;
5555
int i;
5656
bool found = 0;
5757
u32 regval;

0 commit comments

Comments
 (0)