summaryrefslogtreecommitdiff
path: root/drivers/cpufreq/loongson1-cpufreq.c
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2019-07-16 09:36:08 +0530
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2019-07-16 10:20:11 +0200
commitc4dcc8a162784c1f827c7f6d8409598f19708fe6 (patch)
tree5563ea21bf256b47edd2cd12e2978d088b60a5f3 /drivers/cpufreq/loongson1-cpufreq.c
parent5b8010ba70d5aa5b321d3e69b5b31cc3db857d5e (diff)
cpufreq: Make cpufreq_generic_init() return void
It always returns 0 (success) and its return type should really be void. Over that, many drivers have added error handling code based on its return value, which is not required at all. Change its return type to void and update all the callers. 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/loongson1-cpufreq.c')
-rw-r--r--drivers/cpufreq/loongson1-cpufreq.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/cpufreq/loongson1-cpufreq.c b/drivers/cpufreq/loongson1-cpufreq.c
index 21c9ce8526c0..0ea88778882a 100644
--- a/drivers/cpufreq/loongson1-cpufreq.c
+++ b/drivers/cpufreq/loongson1-cpufreq.c
@@ -81,7 +81,7 @@ static int ls1x_cpufreq_init(struct cpufreq_policy *policy)
struct device *cpu_dev = get_cpu_device(policy->cpu);
struct cpufreq_frequency_table *freq_tbl;
unsigned int pll_freq, freq;
- int steps, i, ret;
+ int steps, i;
pll_freq = clk_get_rate(cpufreq->pll_clk) / 1000;
@@ -103,11 +103,9 @@ static int ls1x_cpufreq_init(struct cpufreq_policy *policy)
freq_tbl[i].frequency = CPUFREQ_TABLE_END;
policy->clk = cpufreq->clk;
- ret = cpufreq_generic_init(policy, freq_tbl, 0);
- if (ret)
- kfree(freq_tbl);
+ cpufreq_generic_init(policy, freq_tbl, 0);
- return ret;
+ return 0;
}
static int ls1x_cpufreq_exit(struct cpufreq_policy *policy)