提交 e625742f 编写于 作者: V Viresh Kumar 提交者: Rafael J. Wysocki

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: NViresh Kumar <viresh.kumar@linaro.org>
Acked-by: NSaravana Kannan <skannan@codeaurora.org>
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 51ec005a
...@@ -843,18 +843,11 @@ static ssize_t store(struct kobject *kobj, struct attribute *attr, ...@@ -843,18 +843,11 @@ static ssize_t store(struct kobject *kobj, struct attribute *attr,
down_write(&policy->rwsem); 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) if (fattr->store)
ret = fattr->store(policy, buf, count); ret = fattr->store(policy, buf, count);
else else
ret = -EIO; ret = -EIO;
unlock_policy_rwsem:
up_write(&policy->rwsem); up_write(&policy->rwsem);
unlock: unlock:
put_online_cpus(); put_online_cpus();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册