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

Commit 4e875623 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "cpufreq: Fix policy getting stuck when user & kernel min/max don't overlap"

parents d4f80331 93d46246
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1951,7 +1951,8 @@ static int cpufreq_set_policy(struct cpufreq_policy *policy,

	memcpy(&new_policy->cpuinfo, &policy->cpuinfo, sizeof(policy->cpuinfo));

	if (new_policy->min > policy->max || new_policy->max < policy->min) {
	if (new_policy->min > policy->user_policy.max
	    || new_policy->max < policy->user_policy.min) {
		ret = -EINVAL;
		goto error_out;
	}