cpumask: alloc zeroed cpumask for static cpumask_var_ts
These are defined as static cpumask_var_t so if MAXSMP is not used, they are cleared already. Avoid surprises when MAXSMP is enabled. Signed-off-by: Yinghai Lu <yinghai.lu@kernel.org> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Rusty Russell
parent
0281b5dc03
commit
eaa958402e
@ -808,7 +808,7 @@ static int cpufreq_add_dev(struct sys_device *sys_dev)
|
||||
ret = -ENOMEM;
|
||||
goto nomem_out;
|
||||
}
|
||||
if (!alloc_cpumask_var(&policy->related_cpus, GFP_KERNEL)) {
|
||||
if (!zalloc_cpumask_var(&policy->related_cpus, GFP_KERNEL)) {
|
||||
free_cpumask_var(policy->cpus);
|
||||
kfree(policy);
|
||||
ret = -ENOMEM;
|
||||
|
Reference in New Issue
Block a user