Skip to content

Commit d594b35

Browse files
wenbinmei1storulf
authored andcommitted
mmc: mediatek: free the ext_csd when mmc_get_ext_csd success
If mmc_get_ext_csd success, the ext_csd are not freed. Add the missing kfree() calls. Signed-off-by: Wenbin Mei <[email protected]> Fixes: c4ac38c ("mmc: mtk-sd: Add HS400 online tuning support") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
1 parent 7dba402 commit d594b35

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/mmc/host/mtk-sd.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2291,8 +2291,10 @@ static int msdc_execute_hs400_tuning(struct mmc_host *mmc, struct mmc_card *card
22912291
sdr_set_field(host->base + PAD_DS_TUNE,
22922292
PAD_DS_TUNE_DLY1, i);
22932293
ret = mmc_get_ext_csd(card, &ext_csd);
2294-
if (!ret)
2294+
if (!ret) {
22952295
result_dly1 |= (1 << i);
2296+
kfree(ext_csd);
2297+
}
22962298
}
22972299
host->hs400_tuning = false;
22982300

0 commit comments

Comments
 (0)