From: Viresh Kumar <viresh.kumar@linaro.org>
Date: Tue, 20 Aug 2013 06:38:24 +0000 (+0530)
Subject: cpufreq: remove unnecessary check in __cpufreq_governor()
X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9e9fd801676a946b759a8669baa24ba327c8c903;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git

cpufreq: remove unnecessary check in __cpufreq_governor()

We don't need to check if event is CPUFREQ_GOV_POLICY_INIT and put
governor module as we are sure event can only be START/STOP here.

Remove the useless check.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---

diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 030212104fe6..b03a8514b574 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -1719,8 +1719,6 @@ static int __cpufreq_governor(struct cpufreq_policy *policy,
 	if ((!policy->governor_enabled && (event == CPUFREQ_GOV_STOP)) ||
 	    (policy->governor_enabled && (event == CPUFREQ_GOV_START))) {
 		mutex_unlock(&cpufreq_governor_lock);
-		if (event == CPUFREQ_GOV_POLICY_INIT)
-			module_put(policy->governor->owner);
 		return -EBUSY;
 	}