Merge "mmc: core: Set host->bus_refs properly when card is set as corrupted"

This commit is contained in:
qctecmdr 2021-02-24 20:57:37 -08:00 • committed by Gerrit - the friendly Code Review server
commit 88c9d046cc

View file

@ -3154,11 +3154,6 @@ void mmc_rescan(struct work_struct *work)
if (host->bus_ops && !host->bus_dead)
host->bus_ops->detect(host);
#if defined(CONFIG_SDC_QTI)
if (host->corrupted_card)
return;
#endif
host->detect_change = 0;
/*
@ -3180,6 +3175,11 @@ void mmc_rescan(struct work_struct *work)
*/
mmc_bus_put(host);
#if defined(CONFIG_SDC_QTI)
if (host->corrupted_card)
goto out;
#endif
mmc_claim_host(host);
if (mmc_card_is_removable(host) && host->ops->get_cd &&
host->ops->get_cd(host) == 0) {