Skip to content

Commit af67688

Browse files
committed
Merge tag 'mmc-v6.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc
Pull MMC fixes from Ulf Hansson: "MMC host: - sdhci_am654: Fix support for UHS-I SDR12 and SDR25 speed modes MEMSTICK: - Fix memory leak if card device never gets registered" * tag 'mmc-v6.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: memstick: fix memory leak if card device is never registered mmc: sdhci_am654: Set HIGH_SPEED_ENA for SDR12 and SDR25
2 parents bbab253 + 4b6d621 commit af67688

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

drivers/memstick/core/memstick.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,7 @@ static struct memstick_dev *memstick_alloc_card(struct memstick_host *host)
410410
return card;
411411
err_out:
412412
host->card = old_card;
413+
kfree_const(card->dev.kobj.name);
413414
kfree(card);
414415
return NULL;
415416
}
@@ -468,8 +469,10 @@ static void memstick_check(struct work_struct *work)
468469
put_device(&card->dev);
469470
host->card = NULL;
470471
}
471-
} else
472+
} else {
473+
kfree_const(card->dev.kobj.name);
472474
kfree(card);
475+
}
473476
}
474477

475478
out_power_off:

drivers/mmc/host/sdhci_am654.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,8 +351,6 @@ static void sdhci_am654_write_b(struct sdhci_host *host, u8 val, int reg)
351351
*/
352352
case MMC_TIMING_SD_HS:
353353
case MMC_TIMING_MMC_HS:
354-
case MMC_TIMING_UHS_SDR12:
355-
case MMC_TIMING_UHS_SDR25:
356354
val &= ~SDHCI_CTRL_HISPD;
357355
}
358356
}

0 commit comments

Comments
 (0)