cpumask: alloc zeroed cpumask for static cpumask_var_ts
[firefly-linux-kernel-4.4.55.git] / drivers / cpufreq / cpufreq.c
index 47d2ad0ae079c738fa8aa90656595026a56d7a8a..6e2ec0b189489803ebaa55ecb4ae094bd2a1fdf0 100644 (file)
@@ -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;