Commit 30b8e6b2 authored by Viresh Kumar's avatar Viresh Kumar Committed by Rafael J. Wysocki

cpufreq: Use WARN_ON_ONCE() for invalid relation

The relation can't be invalid here, so if it turns out to be invalid,
just WARN_ON_ONCE() and return 0.
Signed-off-by: default avatarViresh Kumar <>
[ rjw: Subject and changelog edits ]
Signed-off-by: default avatarRafael J. Wysocki <>
parent 681fe684
......@@ -956,8 +956,8 @@ static inline int cpufreq_frequency_table_target(struct cpufreq_policy *policy,
return cpufreq_table_find_index_c(policy, target_freq);
pr_err("%s: Invalid relation: %d\n", __func__, relation);
return -EINVAL;
return 0;
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