From: Viresh Kumar Date: Tue, 13 Oct 2015 05:27:13 +0000 (+0530) Subject: cpufreq: Drop redundant check for inactive policies X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=e625742f9c6e5d01b5c46efcc2870893735badf3;p=openwrt%2Fstaging%2Fblogic.git cpufreq: Drop redundant check for inactive policies We just made sure policy->cpu is online and this check will always fail as the policy is active. Drop it. Signed-off-by: Viresh Kumar Acked-by: Saravana Kannan Signed-off-by: Rafael J. Wysocki --- diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 25c4c15103a0..8701dc559850 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -843,18 +843,11 @@ static ssize_t store(struct kobject *kobj, struct attribute *attr, down_write(&policy->rwsem); - /* Updating inactive policies is invalid, so avoid doing that. */ - if (unlikely(policy_is_inactive(policy))) { - ret = -EBUSY; - goto unlock_policy_rwsem; - } - if (fattr->store) ret = fattr->store(policy, buf, count); else ret = -EIO; -unlock_policy_rwsem: up_write(&policy->rwsem); unlock: put_online_cpus();