mmc: core: Exit clock scaling prior to removing the card
After removing the SD/MMC 'card' from the driver model we are cancelling the pending clock scaling work which accesses card->dev. This could cause NULL pointer issue as the card is already removed. CRs-Fixed: 640344 Change-Id: I8c5ee817e3f116dedf0bf4fb51eb6b70d52467b7 Signed-off-by: Pratibhasagar V <pratibha@codeaurora.org>
This commit is contained in:
parent
9fc518192e
commit
90102c17f9
2 changed files with 3 additions and 2 deletions
|
@ -1908,11 +1908,12 @@ static void mmc_remove(struct mmc_host *host)
|
||||||
BUG_ON(!host->card);
|
BUG_ON(!host->card);
|
||||||
|
|
||||||
unregister_reboot_notifier(&host->card->reboot_notify);
|
unregister_reboot_notifier(&host->card->reboot_notify);
|
||||||
|
|
||||||
|
mmc_exit_clk_scaling(host);
|
||||||
mmc_remove_card(host->card);
|
mmc_remove_card(host->card);
|
||||||
|
|
||||||
mmc_claim_host(host);
|
mmc_claim_host(host);
|
||||||
host->card = NULL;
|
host->card = NULL;
|
||||||
mmc_exit_clk_scaling(host);
|
|
||||||
mmc_release_host(host);
|
mmc_release_host(host);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1119,11 +1119,11 @@ static void mmc_sd_remove(struct mmc_host *host)
|
||||||
BUG_ON(!host);
|
BUG_ON(!host);
|
||||||
BUG_ON(!host->card);
|
BUG_ON(!host->card);
|
||||||
|
|
||||||
|
mmc_exit_clk_scaling(host);
|
||||||
mmc_remove_card(host->card);
|
mmc_remove_card(host->card);
|
||||||
|
|
||||||
mmc_claim_host(host);
|
mmc_claim_host(host);
|
||||||
host->card = NULL;
|
host->card = NULL;
|
||||||
mmc_exit_clk_scaling(host);
|
|
||||||
mmc_release_host(host);
|
mmc_release_host(host);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue