Commit 166529c9 authored by Viresh Kumar's avatar Viresh Kumar Committed by Eduardo Valentin

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: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarEduardo Valentin <edubezval@gmail.com>
parent 76fd38ce
...@@ -235,6 +235,7 @@ static int cpufreq_thermal_notifier(struct notifier_block *nb, ...@@ -235,6 +235,7 @@ static int cpufreq_thermal_notifier(struct notifier_block *nb,
if (policy->max != max_freq) if (policy->max != max_freq)
cpufreq_verify_within_limits(policy, 0, cpufreq_verify_within_limits(policy, 0,
max_freq); max_freq);
break;
} }
mutex_unlock(&cooling_list_lock); mutex_unlock(&cooling_list_lock);
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment