aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kernel/io_apic_64.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/x86/kernel/io_apic_64.c b/arch/x86/kernel/io_apic_64.c
index 966fa1062491..66a27d268d9a 100644
--- a/arch/x86/kernel/io_apic_64.c
+++ b/arch/x86/kernel/io_apic_64.c
@@ -1845,7 +1845,7 @@ static struct sysdev_class ioapic_sysdev_class = {
1845static int __init ioapic_init_sysfs(void) 1845static int __init ioapic_init_sysfs(void)
1846{ 1846{
1847 struct sys_device * dev; 1847 struct sys_device * dev;
1848 int i, size, error = 0; 1848 int i, size, error;
1849 1849
1850 error = sysdev_class_register(&ioapic_sysdev_class); 1850 error = sysdev_class_register(&ioapic_sysdev_class);
1851 if (error) 1851 if (error)
@@ -1854,12 +1854,11 @@ static int __init ioapic_init_sysfs(void)
1854 for (i = 0; i < nr_ioapics; i++ ) { 1854 for (i = 0; i < nr_ioapics; i++ ) {
1855 size = sizeof(struct sys_device) + nr_ioapic_registers[i] 1855 size = sizeof(struct sys_device) + nr_ioapic_registers[i]
1856 * sizeof(struct IO_APIC_route_entry); 1856 * sizeof(struct IO_APIC_route_entry);
1857 mp_ioapic_data[i] = kmalloc(size, GFP_KERNEL); 1857 mp_ioapic_data[i] = kzalloc(size, GFP_KERNEL);
1858 if (!mp_ioapic_data[i]) { 1858 if (!mp_ioapic_data[i]) {
1859 printk(KERN_ERR "Can't suspend/resume IOAPIC %d\n", i); 1859 printk(KERN_ERR "Can't suspend/resume IOAPIC %d\n", i);
1860 continue; 1860 continue;
1861 } 1861 }
1862 memset(mp_ioapic_data[i], 0, size);
1863 dev = &mp_ioapic_data[i]->dev; 1862 dev = &mp_ioapic_data[i]->dev;
1864 dev->id = i; 1863 dev->id = i;
1865 dev->cls = &ioapic_sysdev_class; 1864 dev->cls = &ioapic_sysdev_class;