diff options
-rw-r--r-- | arch/x86/kernel/io_apic_32.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/arch/x86/kernel/io_apic_32.c b/arch/x86/kernel/io_apic_32.c index 9a924ebcd74c..e22cbfbce049 100644 --- a/arch/x86/kernel/io_apic_32.c +++ b/arch/x86/kernel/io_apic_32.c | |||
@@ -702,14 +702,12 @@ static int __init balanced_irq_init(void) | |||
702 | physical_balance = 1; | 702 | physical_balance = 1; |
703 | 703 | ||
704 | for_each_online_cpu(i) { | 704 | for_each_online_cpu(i) { |
705 | irq_cpu_data[i].irq_delta = kmalloc(sizeof(unsigned long) * NR_IRQS, GFP_KERNEL); | 705 | irq_cpu_data[i].irq_delta = kzalloc(sizeof(unsigned long) * NR_IRQS, GFP_KERNEL); |
706 | irq_cpu_data[i].last_irq = kmalloc(sizeof(unsigned long) * NR_IRQS, GFP_KERNEL); | 706 | irq_cpu_data[i].last_irq = kzalloc(sizeof(unsigned long) * NR_IRQS, GFP_KERNEL); |
707 | if (irq_cpu_data[i].irq_delta == NULL || irq_cpu_data[i].last_irq == NULL) { | 707 | if (irq_cpu_data[i].irq_delta == NULL || irq_cpu_data[i].last_irq == NULL) { |
708 | printk(KERN_ERR "balanced_irq_init: out of memory"); | 708 | printk(KERN_ERR "balanced_irq_init: out of memory"); |
709 | goto failed; | 709 | goto failed; |
710 | } | 710 | } |
711 | memset(irq_cpu_data[i].irq_delta, 0, sizeof(unsigned long) * NR_IRQS); | ||
712 | memset(irq_cpu_data[i].last_irq, 0, sizeof(unsigned long) * NR_IRQS); | ||
713 | } | 711 | } |
714 | 712 | ||
715 | printk(KERN_INFO "Starting balanced_irq\n"); | 713 | printk(KERN_INFO "Starting balanced_irq\n"); |
@@ -2382,12 +2380,11 @@ static int __init ioapic_init_sysfs(void) | |||
2382 | for (i = 0; i < nr_ioapics; i++) { | 2380 | for (i = 0; i < nr_ioapics; i++) { |
2383 | size = sizeof(struct sys_device) + nr_ioapic_registers[i] | 2381 | size = sizeof(struct sys_device) + nr_ioapic_registers[i] |
2384 | * sizeof(struct IO_APIC_route_entry); | 2382 | * sizeof(struct IO_APIC_route_entry); |
2385 | mp_ioapic_data[i] = kmalloc(size, GFP_KERNEL); | 2383 | mp_ioapic_data[i] = kzalloc(size, GFP_KERNEL); |
2386 | if (!mp_ioapic_data[i]) { | 2384 | if (!mp_ioapic_data[i]) { |
2387 | printk(KERN_ERR "Can't suspend/resume IOAPIC %d\n", i); | 2385 | printk(KERN_ERR "Can't suspend/resume IOAPIC %d\n", i); |
2388 | continue; | 2386 | continue; |
2389 | } | 2387 | } |
2390 | memset(mp_ioapic_data[i], 0, size); | ||
2391 | dev = &mp_ioapic_data[i]->dev; | 2388 | dev = &mp_ioapic_data[i]->dev; |
2392 | dev->id = i; | 2389 | dev->id = i; |
2393 | dev->cls = &ioapic_sysdev_class; | 2390 | dev->cls = &ioapic_sysdev_class; |