mmc: core: Fixup Oops for SDIO shutdown
authorUlf Hansson <ulf.hansson@linaro.org>
Tue, 2 Jul 2013 10:53:01 +0000 (12:53 +0200)
committerlintao <lintao@rock-chips.com>
Fri, 7 Mar 2014 05:39:00 +0000 (13:39 +0800)
commitaf98bcd3c1a9302ae21cec76cb4f731169bf80ec
treec36612a55ad514975f1d6dde204f711a6863746e
parent5239bf158a2e8a25b9513e1b8373a987079cfb95
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 <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>
drivers/mmc/core/bus.c