diff options
author | Li Fei <fei.li@intel.com> | 2013-04-08 09:36:39 +0800 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2013-04-12 14:15:04 -0400 |
commit | 3bffb800b91bb128b61d83deb01ce63c455d108f (patch) | |
tree | c43e1e0a36a6227fcf2be401aab951eec390e31e /drivers/mmc/core/sdio.c | |
parent | abd4190f0c820b7f118450b52bb95c0be3a441bd (diff) | |
download | linux-3bffb800b91bb128b61d83deb01ce63c455d108f.tar.bz2 |
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.c')
-rw-r--r-- | drivers/mmc/core/sdio.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c index aa0719a4dfd1..6889a821c1da 100644 --- a/drivers/mmc/core/sdio.c +++ b/drivers/mmc/core/sdio.c @@ -861,8 +861,10 @@ static void mmc_sdio_detect(struct mmc_host *host) /* Make sure card is powered before detecting it */ if (host->caps & MMC_CAP_POWER_OFF_CARD) { err = pm_runtime_get_sync(&host->card->dev); - if (err < 0) + if (err < 0) { + pm_runtime_put_noidle(&host->card->dev); goto out; + } } mmc_claim_host(host); |