Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e625742f authored by Viresh Kumar's avatar Viresh Kumar Committed by Rafael J. Wysocki
Browse files

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: default avatarViresh Kumar <viresh.kumar@linaro.org>
Acked-by: default avatarSaravana Kannan <skannan@codeaurora.org>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 51ec005a
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -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();