Skip to content

Commit f7d6358

Browse files
lukaszluba-armvireshk
authored andcommitted
cpufreq: arm_scmi: Fix error path when allocation failed
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 <[email protected]> Reviewed-by: Sudeep Holla <[email protected]> Signed-off-by: Viresh Kumar <[email protected]>
1 parent d66cd5d commit f7d6358

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/cpufreq/scmi-cpufreq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ static int scmi_cpufreq_init(struct cpufreq_policy *policy)
134134
}
135135

136136
if (!zalloc_cpumask_var(&opp_shared_cpus, GFP_KERNEL))
137-
ret = -ENOMEM;
137+
return -ENOMEM;
138138

139139
/* Obtain CPUs that share SCMI performance controls */
140140
ret = scmi_get_sharing_cpus(cpu_dev, policy->cpus);

0 commit comments

Comments
 (0)