Commit d594b35d authored by Wenbin Mei's avatar Wenbin Mei Committed by Ulf Hansson

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: default avatarWenbin Mei <wenbin.mei@mediatek.com>
Fixes: c4ac38c6 ("mmc: mtk-sd: Add HS400 online tuning support")
Link: https://lore.kernel.org/r/20211207075013.22911-1-wenbin.mei@mediatek.comSigned-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent 7dba4028
......@@ -2291,8 +2291,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;
......
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