Skip to content

Commit b9af694

Browse files
committed
cpufreq: Fix clamp_val() usage in cpufreq_driver_fast_switch()
The return value of clamp_val() has to be stored actually. Fixes: b7898fd (cpufreq: Support for fast frequency switching) Reported-by: Steve Muckle <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]> Acked-by: Viresh Kumar <[email protected]>
1 parent 6cacd11 commit b9af694

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/cpufreq/cpufreq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1832,7 +1832,7 @@ EXPORT_SYMBOL(cpufreq_unregister_notifier);
18321832
unsigned int cpufreq_driver_fast_switch(struct cpufreq_policy *policy,
18331833
unsigned int target_freq)
18341834
{
1835-
clamp_val(target_freq, policy->min, policy->max);
1835+
target_freq = clamp_val(target_freq, policy->min, policy->max);
18361836

18371837
return cpufreq_driver->fast_switch(policy, target_freq);
18381838
}

0 commit comments

Comments
 (0)