diff options
author | Viresh Kumar | 2020-08-27 10:54:16 +0530 |
---|---|---|
committer | Rafael J. Wysocki | 2020-08-27 12:51:25 +0200 |
commit | 30b8e6b22fd0f7a56911e69c681e92532e72e3b6 (patch) | |
tree | 9bcb70cac5e21f15957282dc089250f0f4067943 /include | |
parent | 681fe68448ef370f1d7213cab38013ab8e9d8ff0 (diff) |
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: Viresh Kumar <viresh.kumar@linaro.org>
[ rjw: Subject and changelog edits ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/cpufreq.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index 8f141d4c859c..a911e5d06845 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h @@ -956,8 +956,8 @@ static inline int cpufreq_frequency_table_target(struct cpufreq_policy *policy, case CPUFREQ_RELATION_C: return cpufreq_table_find_index_c(policy, target_freq); default: - pr_err("%s: Invalid relation: %d\n", __func__, relation); - return -EINVAL; + WARN_ON_ONCE(1); + return 0; } } |