aboutsummaryrefslogtreecommitdiff
path: root/drivers/cpufreq/cpufreq.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/cpufreq/cpufreq.c')
-rw-r--r--drivers/cpufreq/cpufreq.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 6c6121b85a5..25acf478c9e 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)
goto module_out;
}
- policy = kmalloc(sizeof(struct cpufreq_policy), GFP_KERNEL);
+ policy = kzalloc(sizeof(struct cpufreq_policy), GFP_KERNEL);
if (!policy) {
ret = -ENOMEM;
goto nomem_out;
}
- memset(policy, 0, sizeof(struct cpufreq_policy));
policy->cpu = cpu;
policy->cpus = cpumask_of_cpu(cpu);