aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/s5pv210-cpufreq.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/s5pv210-cpufreq.c
parentcpufreq: Drop 'freq_table' argument of __target_index() (diff)
downloadlinux-dev-d218ed773915a2b762d132be6bb765637338c360.tar.xz
linux-dev-d218ed773915a2b762d132be6bb765637338c360.zip
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/s5pv210-cpufreq.c')
-rw-r--r--drivers/cpufreq/s5pv210-cpufreq.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/cpufreq/s5pv210-cpufreq.c b/drivers/cpufreq/s5pv210-cpufreq.c
index 6b0cfc3b8c46..4f4e9df9b7fc 100644
--- a/drivers/cpufreq/s5pv210-cpufreq.c
+++ b/drivers/cpufreq/s5pv210-cpufreq.c
@@ -246,11 +246,8 @@ static int s5pv210_target(struct cpufreq_policy *policy, unsigned int index)
new_freq = s5pv210_freq_table[index].frequency;
/* Finding current running level index */
- if (cpufreq_frequency_table_target(policy, old_freq, CPUFREQ_RELATION_H,
- &priv_index)) {
- ret = -EINVAL;
- goto exit;
- }
+ priv_index = cpufreq_frequency_table_target(policy, old_freq,
+ CPUFREQ_RELATION_H);
arm_volt = dvs_conf[index].arm_volt;
int_volt = dvs_conf[index].int_volt;