diff options
Diffstat (limited to 'drivers/cpufreq/cpufreq.c')
-rw-r--r-- | drivers/cpufreq/cpufreq.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 6c6121b85a54..25acf478c9e8 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c | |||
@@ -593,12 +593,11 @@ static int cpufreq_add_dev (struct sys_device * sys_dev) | |||
593 | goto module_out; | 593 | goto module_out; |
594 | } | 594 | } |
595 | 595 | ||
596 | policy = kmalloc(sizeof(struct cpufreq_policy), GFP_KERNEL); | 596 | policy = kzalloc(sizeof(struct cpufreq_policy), GFP_KERNEL); |
597 | if (!policy) { | 597 | if (!policy) { |
598 | ret = -ENOMEM; | 598 | ret = -ENOMEM; |
599 | goto nomem_out; | 599 | goto nomem_out; |
600 | } | 600 | } |
601 | memset(policy, 0, sizeof(struct cpufreq_policy)); | ||
602 | 601 | ||
603 | policy->cpu = cpu; | 602 | policy->cpu = cpu; |
604 | policy->cpus = cpumask_of_cpu(cpu); | 603 | policy->cpus = cpumask_of_cpu(cpu); |