Skip to content

Commit 92771cd

Browse files
littleqypstorulf
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 <[email protected]> Reported-by: Dan Carpenter <[email protected]> Reviewed-by: Emil Renner Berthing <[email protected]> Fixes: 9e62222 ("mmc: starfive: Add sdio/emmc driver support") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
1 parent 11440da commit 92771cd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)