aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukasz Luba <[email protected]>2021-08-03 10:07:44 +0100
committerViresh Kumar <[email protected]>2021-08-04 09:31:57 +0530
commitf7d635883fb73414c7c4e2648b42adc296c5d40d (patch)
treede511eb27e6a8ab0f96734f5031b6ff4d31d07e9
parentd66cd5dea551e974580a64bf80b337b9a09ce63e (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 <[email protected]> Reviewed-by: Sudeep Holla <[email protected]> Signed-off-by: Viresh Kumar <[email protected]>
-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);