Skip to content

Commit d299704

Browse files
committed
Merge tag 'mmc-v4.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc
Pull MMC fixes from Ulf Hansson: "MMC host: - sdhci-msm: Fix error path in probe - dw_mmc-pltfm: Avoid NULL pointer dereference" * tag 'mmc-v4.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: sdhci-msm: Fix error return code in sdhci_msm_probe() mmc: dw_mmc-pltfm: fix the potential NULL pointer dereference
2 parents 594aef6 + d1f63f0 commit d299704

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

drivers/mmc/host/dw_mmc-pltfm.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,13 @@ int dw_mci_pltfm_register(struct platform_device *pdev,
4646
host->pdata = pdev->dev.platform_data;
4747

4848
regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
49-
/* Get registers' physical base address */
50-
host->phy_regs = regs->start;
5149
host->regs = devm_ioremap_resource(&pdev->dev, regs);
5250
if (IS_ERR(host->regs))
5351
return PTR_ERR(host->regs);
5452

53+
/* Get registers' physical base address */
54+
host->phy_regs = regs->start;
55+
5556
platform_set_drvdata(pdev, host);
5657
return dw_mci_probe(host);
5758
}

drivers/mmc/host/sdhci-msm.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -647,6 +647,7 @@ static int sdhci_msm_probe(struct platform_device *pdev)
647647
if (msm_host->pwr_irq < 0) {
648648
dev_err(&pdev->dev, "Get pwr_irq failed (%d)\n",
649649
msm_host->pwr_irq);
650+
ret = msm_host->pwr_irq;
650651
goto clk_disable;
651652
}
652653

0 commit comments

Comments
 (0)