mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
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 <[email protected]> Acked-by: Saravana Kannan <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
This commit is contained in:
parent
51ec005a94
commit
e625742f9c
1 changed files with 0 additions and 7 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in a new issue