From: Junjie Wu <junj...@codeaurora.org>

Fix failure recovery path in cpufreq_governor_interactive(). Call
cpufreq_put_global_kobject() to release cpufreq global kobject upon
governor init failure.

Change-Id: I7a977070b7a3c75c90acccd2c117064ed1a10d0e
Signed-off-by: Junjie Wu <junj...@codeaurora.org>
Signed-off-by: Bálint Czobor <czoborbal...@gmail.com>
---
 drivers/cpufreq/cpufreq_interactive.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/cpufreq/cpufreq_interactive.c 
b/drivers/cpufreq/cpufreq_interactive.c
index 9faa189..2055266 100644
--- a/drivers/cpufreq/cpufreq_interactive.c
+++ b/drivers/cpufreq/cpufreq_interactive.c
@@ -1180,8 +1180,10 @@ static int cpufreq_governor_interactive(struct 
cpufreq_policy *policy,
                if (rc) {
                        kfree(tunables);
                        policy->governor_data = NULL;
-                       if (!have_governor_per_policy())
+                       if (!have_governor_per_policy()) {
                                common_tunables = NULL;
+                               cpufreq_put_global_kobject();
+                       }
                        return rc;
                }
 
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to