From: Baolin Wang Date: Mon, 15 Jul 2019 10:00:14 +0000 (+0800) Subject: mmc: host: sdhci-sprd: Fix the missing pm_runtime_put_noidle() X-Git-Tag: v5.2.7~54 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=632def0075be32563ac3a699606e4587f30b1d49;p=thirdparty%2Fkernel%2Fstable.git mmc: host: sdhci-sprd: Fix the missing pm_runtime_put_noidle() commit fc62113b32c95906b3ea8ba42e91014c7d0c6fa6 upstream. When the SD host controller tries to probe again due to the derferred probe mechanism, it will always keep the SD host device as runtime resume state due to missing the runtime put operation in error path last time. Thus add the pm_runtime_put_noidle() in error path to make the PM runtime counter balance, which can make the SD host device's PM runtime work well. Signed-off-by: Baolin Wang Acked-by: Adrian Hunter Fixes: fb8bd90f83c4 ("mmc: sdhci-sprd: Add Spreadtrum's initial host controller") Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/mmc/host/sdhci-sprd.c b/drivers/mmc/host/sdhci-sprd.c index 9a822e2e9f0b6..06f84a4d79e00 100644 --- a/drivers/mmc/host/sdhci-sprd.c +++ b/drivers/mmc/host/sdhci-sprd.c @@ -405,6 +405,7 @@ err_cleanup_host: sdhci_cleanup_host(host); pm_runtime_disable: + pm_runtime_put_noidle(&pdev->dev); pm_runtime_disable(&pdev->dev); pm_runtime_set_suspended(&pdev->dev);