diff options
author | Wenbin Mei <wenbin.mei@mediatek.com> | 2021-12-07 10:50:13 +0300 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2021-12-09 12:30:11 +0300 |
commit | d594b35d3b31bc04b6ef36589f38135d3acb8df5 (patch) | |
tree | b7bd3e32316de7c4269ca8fb3726cc1674718b33 /drivers/mmc/host/mtk-sd.c | |
parent | 7dba402807a85fa3723f4a27504813caf81cc9d7 (diff) | |
download | linux-d594b35d3b31bc04b6ef36589f38135d3acb8df5.tar.xz |
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 <wenbin.mei@mediatek.com>
Fixes: c4ac38c6539b ("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>
Diffstat (limited to 'drivers/mmc/host/mtk-sd.c')
-rw-r--r-- | drivers/mmc/host/mtk-sd.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c index 943940b44e83..632775217d35 100644 --- a/drivers/mmc/host/mtk-sd.c +++ b/drivers/mmc/host/mtk-sd.c @@ -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; |