summaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq
diff options
context:
space:
mode:
authorLukasz Luba <lukasz.luba@arm.com>2021-08-03 11:07:44 +0200
committerViresh Kumar <viresh.kumar@linaro.org>2021-08-04 06:01:57 +0200
commitf7d635883fb73414c7c4e2648b42adc296c5d40d (patch)
treede511eb27e6a8ab0f96734f5031b6ff4d31d07e9 /drivers/cpufreq
parentcpufreq: blacklist Qualcomm sc8180x in cpufreq-dt-platdev (diff)
downloadlinux-f7d635883fb73414c7c4e2648b42adc296c5d40d.tar.xz
linux-f7d635883fb73414c7c4e2648b42adc296c5d40d.zip
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.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);