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

Commit 203bb5af authored by Ulf Hansson's avatar Ulf Hansson Committed by Chris Ball
Browse files

mmc: core: Fixup Oops for SDIO shutdown



Commit "mmc: core: Handle card shutdown from mmc_bus" introduced an
Oops in the shutdown sequence for SDIO.

The drv pointer, does not exist for SDIO since the probing of the SDIO
card from the mmc_bus perspective is expected to fail by returning
-ENODEV.

This patch adds the proper check for the pointer before calling it.

Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
Reported-by: default avatarStephen Warren <swarren@wwwdotorg.org>
Reported-by: default avatarTuomas Tynkkynen <ttynkkynen@nvidia.com>
Tested-by: default avatarTuomas Tynkkynen <ttynkkynen@nvidia.com>
Acked-by: default avatarJaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: default avatarChris Ball <cjb@laptop.org>
parent 30d025c0
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -129,6 +129,7 @@ static void mmc_bus_shutdown(struct device *dev)
	struct mmc_host *host = card->host;
	int ret;

	if (dev->driver && drv->shutdown)
		drv->shutdown(card);

	if (host->bus_ops->shutdown) {