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>
This commit is contained in:

committed by
Rafael J. Wysocki

parent
5b8010ba70
commit
c4dcc8a162
@@ -147,7 +147,6 @@ out:
|
||||
|
||||
static int s3c64xx_cpufreq_driver_init(struct cpufreq_policy *policy)
|
||||
{
|
||||
int ret;
|
||||
struct cpufreq_frequency_table *freq;
|
||||
|
||||
if (policy->cpu != 0)
|
||||
@@ -168,8 +167,7 @@ static int s3c64xx_cpufreq_driver_init(struct cpufreq_policy *policy)
|
||||
#ifdef CONFIG_REGULATOR
|
||||
vddarm = regulator_get(NULL, "vddarm");
|
||||
if (IS_ERR(vddarm)) {
|
||||
ret = PTR_ERR(vddarm);
|
||||
pr_err("Failed to obtain VDDARM: %d\n", ret);
|
||||
pr_err("Failed to obtain VDDARM: %ld\n", PTR_ERR(vddarm));
|
||||
pr_err("Only frequency scaling available\n");
|
||||
vddarm = NULL;
|
||||
} else {
|
||||
@@ -199,16 +197,9 @@ static int s3c64xx_cpufreq_driver_init(struct cpufreq_policy *policy)
|
||||
* the PLLs, which we don't currently) is ~300us worst case,
|
||||
* but add some fudge.
|
||||
*/
|
||||
ret = cpufreq_generic_init(policy, s3c64xx_freq_table,
|
||||
cpufreq_generic_init(policy, s3c64xx_freq_table,
|
||||
(500 * 1000) + regulator_latency);
|
||||
if (ret != 0) {
|
||||
pr_err("Failed to configure frequency table: %d\n",
|
||||
ret);
|
||||
regulator_put(vddarm);
|
||||
clk_put(policy->clk);
|
||||
}
|
||||
|
||||
return ret;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct cpufreq_driver s3c64xx_cpufreq_driver = {
|
||||
|
Reference in New Issue
Block a user