diff options
Diffstat (limited to 'arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c')
-rw-r--r-- | arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c b/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c index 1465974256c9..edb9873e27e3 100644 --- a/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c +++ b/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c | |||
@@ -67,7 +67,7 @@ static const struct cpu_id cpu_ids[] = { | |||
67 | [CPU_MP4HT_D0] = {15, 3, 4 }, | 67 | [CPU_MP4HT_D0] = {15, 3, 4 }, |
68 | [CPU_MP4HT_E0] = {15, 4, 1 }, | 68 | [CPU_MP4HT_E0] = {15, 4, 1 }, |
69 | }; | 69 | }; |
70 | #define N_IDS (sizeof(cpu_ids)/sizeof(cpu_ids[0])) | 70 | #define N_IDS ARRAY_SIZE(cpu_ids) |
71 | 71 | ||
72 | struct cpu_model | 72 | struct cpu_model |
73 | { | 73 | { |
@@ -423,12 +423,11 @@ static int centrino_cpu_init_acpi(struct cpufreq_policy *policy) | |||
423 | } | 423 | } |
424 | } | 424 | } |
425 | 425 | ||
426 | centrino_model[cpu] = kmalloc(sizeof(struct cpu_model), GFP_KERNEL); | 426 | centrino_model[cpu] = kzalloc(sizeof(struct cpu_model), GFP_KERNEL); |
427 | if (!centrino_model[cpu]) { | 427 | if (!centrino_model[cpu]) { |
428 | result = -ENOMEM; | 428 | result = -ENOMEM; |
429 | goto err_unreg; | 429 | goto err_unreg; |
430 | } | 430 | } |
431 | memset(centrino_model[cpu], 0, sizeof(struct cpu_model)); | ||
432 | 431 | ||
433 | centrino_model[cpu]->model_name=NULL; | 432 | centrino_model[cpu]->model_name=NULL; |
434 | centrino_model[cpu]->max_freq = p.states[0].core_frequency * 1000; | 433 | centrino_model[cpu]->max_freq = p.states[0].core_frequency * 1000; |