Commit f7d63588 authored by Lukasz Luba's avatar Lukasz Luba Committed by Viresh Kumar

cpufreq: arm_scmi: Fix error path when allocation failed

Stop the initialization when cpumask allocation failed and return an
error.

Fixes: 80a064db ("scmi-cpufreq: Get opp_shared_cpus from opp-v2 for EM")
Signed-off-by: default avatarLukasz Luba <lukasz.luba@arm.com>
Reviewed-by: default avatarSudeep Holla <sudeep.holla@arm.com>
Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
parent d66cd5de
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment