Message ID | 20210302232321.854084-1-nobuhiro1.iwamatsu@toshiba.co.jp |
---|---|
State | New |
Headers | show |
Series | [for,4.4] mmc: sdhci-esdhc-imx: fix kernel panic when remove module | expand |
On Wed, Mar 03, 2021 at 08:23:21AM +0900, Nobuhiro Iwamatsu wrote: > From: Frank Li <Frank.Li@nxp.com> > > commit a56f44138a2c57047f1ea94ea121af31c595132b upstream. Now queued up, thanks. greg k-h
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c index 8d838779fd1bcd..b95d911ef497b4 100644 --- a/drivers/mmc/host/sdhci-esdhc-imx.c +++ b/drivers/mmc/host/sdhci-esdhc-imx.c @@ -1240,9 +1240,10 @@ static int sdhci_esdhc_imx_remove(struct platform_device *pdev) struct sdhci_host *host = platform_get_drvdata(pdev); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); struct pltfm_imx_data *imx_data = pltfm_host->priv; - int dead = (readl(host->ioaddr + SDHCI_INT_STATUS) == 0xffffffff); + int dead; pm_runtime_get_sync(&pdev->dev); + dead = (readl(host->ioaddr + SDHCI_INT_STATUS) == 0xffffffff); pm_runtime_disable(&pdev->dev); pm_runtime_put_noidle(&pdev->dev);