mmc: sdhci-msm: Ensure SD card power isn't ON when card removed

Make sure SD card power is not enabled when the card is
being removed.

Change-Id: I65c0d9e134010e6da04343b5c90725ad069e242a
Signed-off-by: Bao D. Nguyen <nguyenb@codeaurora.org>
This commit is contained in:
Bao D. Nguyen 2020-05-20 15:58:51 -07:00
commit 371376cd93

View file

@ -2098,7 +2098,7 @@ static void sdhci_msm_handle_pwr_irq(struct sdhci_host *host, int irq)
udelay(10);
}
if (mmc->ops->get_cd && !mmc->ops->get_cd(mmc) &&
if (mmc->card && mmc->ops->get_cd && !mmc->ops->get_cd(mmc) &&
irq_status & CORE_PWRCTL_BUS_ON) {
irq_ack = CORE_PWRCTL_BUS_FAIL;
msm_host_writel(msm_host, irq_ack, host,