Skip to content

Commit d1cb771

Browse files
committed
Merge tag 'mmc-v4.17-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc
Pull MMC fixes from Ulf Hansson: "MMC core: - Prevent bus reference leak in mmc_blk_init() MMC host: - tmio: Fix error handling when issuing CMD23 - jz4740: Fix race condition in IRQ mask update" * tag 'mmc-v4.17-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: tmio: Fix error handling when issuing CMD23 mmc: core: Prevent bus reference leak in mmc_blk_init() mmc: jz4740: Fix race condition in IRQ mask update
2 parents cb098d5 + fc167da commit d1cb771

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

drivers/mmc/core/block.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3080,6 +3080,7 @@ static void __exit mmc_blk_exit(void)
30803080
mmc_unregister_driver(&mmc_driver);
30813081
unregister_blkdev(MMC_BLOCK_MAJOR, "mmc");
30823082
unregister_chrdev_region(mmc_rpmb_devt, MAX_DEVICES);
3083+
bus_unregister(&mmc_rpmb_bus_type);
30833084
}
30843085

30853086
module_init(mmc_blk_init);

drivers/mmc/host/jz4740_mmc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,9 +362,9 @@ static void jz4740_mmc_set_irq_enabled(struct jz4740_mmc_host *host,
362362
host->irq_mask &= ~irq;
363363
else
364364
host->irq_mask |= irq;
365-
spin_unlock_irqrestore(&host->lock, flags);
366365

367366
writew(host->irq_mask, host->base + JZ_REG_MMC_IMASK);
367+
spin_unlock_irqrestore(&host->lock, flags);
368368
}
369369

370370
static void jz4740_mmc_clock_enable(struct jz4740_mmc_host *host,

drivers/mmc/host/tmio_mmc_core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -913,7 +913,7 @@ static void tmio_mmc_finish_request(struct tmio_mmc_host *host)
913913
host->check_scc_error(host);
914914

915915
/* If SET_BLOCK_COUNT, continue with main command */
916-
if (host->mrq) {
916+
if (host->mrq && !mrq->cmd->error) {
917917
tmio_process_mrq(host, mrq);
918918
return;
919919
}

0 commit comments

Comments
 (0)