mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
UPSTREAM: 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. Bug: 254441685 Signed-off-by: Wenbin Mei <wenbin.mei@mediatek.com> Fixes:c4ac38c653("mmc: mtk-sd: Add HS400 online tuning support") Link: https://lore.kernel.org/r/20211207075013.22911-1-wenbin.mei@mediatek.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> (cherry picked from commitd594b35d3b) Signed-off-by: Lee Jones <joneslee@google.com> Change-Id: I5da7d65f841e84ea861dcf2213953a007d8a8892
This commit is contained in:
committed by
Treehugger Robot
parent
a6eaf3db80
commit
033dde8261
@@ -2299,8 +2299,10 @@ static int msdc_execute_hs400_tuning(struct mmc_host *mmc, struct mmc_card *card
|
||||
sdr_set_field(host->base + PAD_DS_TUNE,
|
||||
PAD_DS_TUNE_DLY1, i);
|
||||
ret = mmc_get_ext_csd(card, &ext_csd);
|
||||
if (!ret)
|
||||
if (!ret) {
|
||||
result_dly1 |= (1 << i);
|
||||
kfree(ext_csd);
|
||||
}
|
||||
}
|
||||
host->hs400_tuning = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user