mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 19:29:37 +00:00
thermal/cpu_cooling: quit early after updating policy
If a valid cpufreq_dev is found for policy->cpu, we should update the policy and quit the for loop. There is no need to keep traversing the list of cpufreq_dev's. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
This commit is contained in:
parent
76fd38ce21
commit
166529c9b6
1 changed files with 1 additions and 0 deletions
|
@ -235,6 +235,7 @@ static int cpufreq_thermal_notifier(struct notifier_block *nb,
|
|||
if (policy->max != max_freq)
|
||||
cpufreq_verify_within_limits(policy, 0,
|
||||
max_freq);
|
||||
break;
|
||||
}
|
||||
mutex_unlock(&cooling_list_lock);
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue