Skip to content

Commit 2ca4b65

Browse files
committed
Merge tag 'mmc-v5.16-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc
Pull MMC host fixes from Ulf Hansson: - mtk-sd: Fix memory leak during tuning - renesas_sdhi: Initialize variable properly when tuning * tag 'mmc-v5.16-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: mediatek: free the ext_csd when mmc_get_ext_csd success mmc: renesas_sdhi: initialize variable properly when tuning
2 parents bec8cb2 + d594b35 commit 2ca4b65

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
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

drivers/mmc/host/renesas_sdhi_core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,7 @@ static int renesas_sdhi_execute_tuning(struct mmc_host *mmc, u32 opcode)
673673

674674
/* Issue CMD19 twice for each tap */
675675
for (i = 0; i < 2 * priv->tap_num; i++) {
676-
int cmd_error;
676+
int cmd_error = 0;
677677

678678
/* Set sampling clock position */
679679
sd_scc_write32(host, priv, SH_MOBILE_SDHI_SCC_TAPSET, i % priv->tap_num);

0 commit comments

Comments
 (0)