cpufreq: remove unnecessary check in __cpufreq_governor()
authorViresh Kumar <viresh.kumar@linaro.org>
Tue, 20 Aug 2013 06:38:24 +0000 (12:08 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 20 Aug 2013 13:43:50 +0000 (15:43 +0200)
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>
drivers/cpufreq/cpufreq.c

index 030212104fe6dfc6b9cbcafff6d3e7331593cea9..b03a8514b5740ca5eb1932452a46930df829800c 100644 (file)
@@ -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;
        }