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 109d62ccf651..cfe1d0a2262d 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c | |||
@@ -595,12 +595,11 @@ static int cpufreq_add_dev (struct sys_device * sys_dev) | |||
595 | goto module_out; | 595 | goto module_out; |
596 | } | 596 | } |
597 | 597 | ||
598 | policy = kmalloc(sizeof(struct cpufreq_policy), GFP_KERNEL); | 598 | policy = kzalloc(sizeof(struct cpufreq_policy), GFP_KERNEL); |
599 | if (!policy) { | 599 | if (!policy) { |
600 | ret = -ENOMEM; | 600 | ret = -ENOMEM; |
601 | goto nomem_out; | 601 | goto nomem_out; |
602 | } | 602 | } |
603 | memset(policy, 0, sizeof(struct cpufreq_policy)); | ||
604 | 603 | ||
605 | policy->cpu = cpu; | 604 | policy->cpu = cpu; |
606 | policy->cpus = cpumask_of_cpu(cpu); | 605 | policy->cpus = cpumask_of_cpu(cpu); |