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. Change-Id: I31b014f9c6600683e79738e161fcb946a1f4948b Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Reported-by: Stephen Warren <swarren@wwwdotorg.org> Reported-by: Tuomas Tynkkynen <ttynkkynen@nvidia.com> Tested-by: Tuomas Tynkkynen <ttynkkynen@nvidia.com> Acked-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Chris Ball <cjb@laptop.org> Git-commit: b807de244fa78d579fa7283b37fc21b3c13eddab Git-repo: https://android.googlesource.com/kernel/common.git Signed-off-by: Kaushal Kumar <kaushalk@codeaurora.org>
This commit is contained in:
parent
07096fa0de
commit
58dd0915dd
|
@ -130,7 +130,8 @@ static void mmc_bus_shutdown(struct device *dev)
|
|||
struct mmc_host *host = card->host;
|
||||
int ret;
|
||||
|
||||
drv->shutdown(card);
|
||||
if (dev->driver && drv->shutdown)
|
||||
drv->shutdown(card);
|
||||
|
||||
if (host->bus_ops->shutdown) {
|
||||
ret = host->bus_ops->shutdown(host);
|
||||
|
|
Loading…
Reference in New Issue