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

Commit 384621f6 authored by hangtian's avatar hangtian
Browse files

mmc: core: Do not set host->card to NULL if oldcard is not released



When card initiated mmc_power_restore_host() which triggers 2nd time
mmc_sdio_init_card(), we free the new allocated card and keep oldcard,
so we cannot set host->card to NULL if we still have oldcard.

Change-Id: I50cf6b543244fe929bc08da64571b7ccfd734f77
CRs-Fixed: 2487134
Signed-off-by: default avatarhangtian <hangtian@codeaurora.org>
parent b6fbaa1d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -282,7 +282,7 @@ static void mmc_release_card(struct device *dev)
	kfree(card->info);

	kfree(card);
	if (host)
	if (host && card == host->card)
		host->card = NULL;
}