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

This commit is contained in:
qctecmdr 2020-06-18 18:45:14 -07:00 • committed by Gerrit - the friendly Code Review server
commit eaba670acb

View file

@ -2105,7 +2105,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,