From: Viresh Kumar Date: Tue, 20 Aug 2013 06:38:24 +0000 (+0530) Subject: cpufreq: remove unnecessary check in __cpufreq_governor() X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=9e9fd801676a946b759a8669baa24ba327c8c903;p=openwrt%2Fstaging%2Fblogic.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 Signed-off-by: Rafael J. Wysocki --- 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; }