diff options
author | Lukasz Luba <lukasz.luba@arm.com> | 2021-08-03 10:07:44 +0100 |
---|---|---|
committer | Viresh Kumar <viresh.kumar@linaro.org> | 2021-08-04 09:31:57 +0530 |
commit | f7d635883fb73414c7c4e2648b42adc296c5d40d (patch) | |
tree | de511eb27e6a8ab0f96734f5031b6ff4d31d07e9 /drivers/cpufreq | |
parent | d66cd5dea551e974580a64bf80b337b9a09ce63e (diff) |
cpufreq: arm_scmi: Fix error path when allocation failed
Stop the initialization when cpumask allocation failed and return an
error.
Fixes: 80a064dbd556 ("scmi-cpufreq: Get opp_shared_cpus from opp-v2 for EM")
Signed-off-by: Lukasz Luba <lukasz.luba@arm.com>
Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r-- | drivers/cpufreq/scmi-cpufreq.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/cpufreq/scmi-cpufreq.c b/drivers/cpufreq/scmi-cpufreq.c index ec9a87ca2dbb..75f818d04b48 100644 --- a/drivers/cpufreq/scmi-cpufreq.c +++ b/drivers/cpufreq/scmi-cpufreq.c @@ -134,7 +134,7 @@ static int scmi_cpufreq_init(struct cpufreq_policy *policy) } if (!zalloc_cpumask_var(&opp_shared_cpus, GFP_KERNEL)) - ret = -ENOMEM; + return -ENOMEM; /* Obtain CPUs that share SCMI performance controls */ ret = scmi_get_sharing_cpus(cpu_dev, policy->cpus); |