summaryrefslogtreecommitdiff
path: root/drivers/cpufreq/scmi-cpufreq.c
diff options
context:
space:
mode:
authorLukasz Luba <lukasz.luba@arm.com>2021-08-03 12:07:44 +0300
committerViresh Kumar <viresh.kumar@linaro.org>2021-08-04 07:01:57 +0300
commitf7d635883fb73414c7c4e2648b42adc296c5d40d (patch)
treede511eb27e6a8ab0f96734f5031b6ff4d31d07e9 /drivers/cpufreq/scmi-cpufreq.c
parentd66cd5dea551e974580a64bf80b337b9a09ce63e (diff)
downloadlinux-f7d635883fb73414c7c4e2648b42adc296c5d40d.tar.xz
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/scmi-cpufreq.c')
-rw-r--r--drivers/cpufreq/scmi-cpufreq.c2
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);