Skip to content

Commit

Permalink
cpufreq: arm_scmi: Fix error path when allocation failed
Browse files Browse the repository at this point in the history
Stop the initialization when cpumask allocation failed and return an
error.

Fixes: 80a064d ("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>
  • Loading branch information
Lukasz Luba authored and Viresh Kumar committed Aug 4, 2021
1 parent d66cd5d commit f7d6358
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/cpufreq/scmi-cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f7d6358

Please sign in to comment.