diff options
-rw-r--r-- | drivers/mmc/core/bus.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/core/bus.c index 4c0decfffb53..d4b99bbe0781 100644 --- a/drivers/mmc/core/bus.c +++ b/drivers/mmc/core/bus.c @@ -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); |