Commit b9af6948 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki
Browse files

cpufreq: Fix clamp_val() usage in cpufreq_driver_fast_switch()

The return value of clamp_val() has to be stored actually.

Fixes: b7898fda

 (cpufreq: Support for fast frequency switching)
Reported-by: default avatarSteve Muckle <steve.muckle@linaro.org>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
parent 6cacd115
......@@ -1832,7 +1832,7 @@ EXPORT_SYMBOL(cpufreq_unregister_notifier);
unsigned int cpufreq_driver_fast_switch(struct cpufreq_policy *policy,
unsigned int target_freq)
{
clamp_val(target_freq, policy->min, policy->max);
target_freq = clamp_val(target_freq, policy->min, policy->max);
return cpufreq_driver->fast_switch(policy, target_freq);
}
......
Supports Markdown
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