summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/core/sdio_bus.c
diff options
context:
space:
mode:
authorLi Fei <fei.li@intel.com>2013-04-08 09:36:39 +0800
committerChris Ball <cjb@laptop.org>2013-04-12 14:15:04 -0400
commit3bffb800b91bb128b61d83deb01ce63c455d108f (patch)
treec43e1e0a36a6227fcf2be401aab951eec390e31e /drivers/mmc/core/sdio_bus.c
parentabd4190f0c820b7f118450b52bb95c0be3a441bd (diff)
downloadop-kernel-dev-3bffb800b91bb128b61d83deb01ce63c455d108f.zip
op-kernel-dev-3bffb800b91bb128b61d83deb01ce63c455d108f.tar.gz
mmc: core: call pm_runtime_put_noidle in pm_runtime_get_sync failed case
Even in failed case of pm_runtime_get_sync, the usage_count is incremented. In order to keep the usage_count with correct value and runtime power management to behave correctly, call pm_runtime_put_noidle in such case. Signed-off-by: Liu Chuansheng <chuansheng.liu@intel.com> Signed-off-by: Li Fei <fei.li@intel.com> Acked-by: Ohad Ben-Cohen <ohad@wizery.com> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc/core/sdio_bus.c')
-rw-r--r--drivers/mmc/core/sdio_bus.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/mmc/core/sdio_bus.c b/drivers/mmc/core/sdio_bus.c
index 8d6bb182..546c67c 100644
--- a/drivers/mmc/core/sdio_bus.c
+++ b/drivers/mmc/core/sdio_bus.c
@@ -138,7 +138,7 @@ static int sdio_bus_probe(struct device *dev)
if (func->card->host->caps & MMC_CAP_POWER_OFF_CARD) {
ret = pm_runtime_get_sync(dev);
if (ret < 0)
- goto out;
+ goto disable_runtimepm;
}
/* Set the default block size so the driver is sure it's something
@@ -158,7 +158,6 @@ static int sdio_bus_probe(struct device *dev)
disable_runtimepm:
if (func->card->host->caps & MMC_CAP_POWER_OFF_CARD)
pm_runtime_put_noidle(dev);
-out:
return ret;
}
OpenPOWER on IntegriCloud