summaryrefslogtreecommitdiff
path: root/drivers/cpufreq/amd_freq_sensitivity.c
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2016-06-03 10:58:51 +0530
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-06-09 00:58:06 +0200
commitd218ed773915a2b762d132be6bb765637338c360 (patch)
tree12e1e64d24fc80cbadff5285a439d441ed186c2f /drivers/cpufreq/amd_freq_sensitivity.c
parent2372784542cb7a8b256a740840abf4503de0d669 (diff)
cpufreq: Return index from cpufreq_frequency_table_target()
This routine can't fail unless the frequency table is invalid and doesn't contain any valid entries. Make it return the index and WARN() in case it is used for an invalid table. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpufreq/amd_freq_sensitivity.c')
-rw-r--r--drivers/cpufreq/amd_freq_sensitivity.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/cpufreq/amd_freq_sensitivity.c b/drivers/cpufreq/amd_freq_sensitivity.c
index 3bea1bb791a9..6d5dc04c3a37 100644
--- a/drivers/cpufreq/amd_freq_sensitivity.c
+++ b/drivers/cpufreq/amd_freq_sensitivity.c
@@ -91,8 +91,8 @@ static unsigned int amd_powersave_bias_target(struct cpufreq_policy *policy,
else {
unsigned int index;
- cpufreq_frequency_table_target(policy,
- policy->cur - 1, CPUFREQ_RELATION_H, &index);
+ index = cpufreq_frequency_table_target(policy,
+ policy->cur - 1, CPUFREQ_RELATION_H);
freq_next = policy->freq_table[index].frequency;
}