mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
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: Ulf Hansson <[email protected]> Reported-by: Stephen Warren <[email protected]> Reported-by: Tuomas Tynkkynen <[email protected]> Tested-by: Tuomas Tynkkynen <[email protected]> Acked-by: Jaehoon Chung <[email protected]> Signed-off-by: Chris Ball <[email protected]>
This commit is contained in:
parent
30d025c0f7
commit
203bb5af65
1 changed files with 2 additions and 1 deletions
|
|
@ -129,7 +129,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 a new issue