Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 90102c17 authored by Pratibhasagar V's avatar Pratibhasagar V Committed by Subhash Jadavani
Browse files

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: default avatarPratibhasagar V <pratibha@codeaurora.org>
parent 9fc51819
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1908,11 +1908,12 @@ static void mmc_remove(struct mmc_host *host)
	BUG_ON(!host->card);

	unregister_reboot_notifier(&host->card->reboot_notify);

	mmc_exit_clk_scaling(host);
	mmc_remove_card(host->card);

	mmc_claim_host(host);
	host->card = NULL;
	mmc_exit_clk_scaling(host);
	mmc_release_host(host);
}

+1 −1
Original line number Diff line number Diff line
@@ -1119,11 +1119,11 @@ static void mmc_sd_remove(struct mmc_host *host)
	BUG_ON(!host);
	BUG_ON(!host->card);

	mmc_exit_clk_scaling(host);
	mmc_remove_card(host->card);

	mmc_claim_host(host);
	host->card = NULL;
	mmc_exit_clk_scaling(host);
	mmc_release_host(host);
}