Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / drivers / pci / hotplug / cpci_hotplug_core.c
index 30af105..037ce4c 100644 (file)
@@ -248,22 +248,19 @@ cpci_hp_register_bus(struct pci_bus *bus, u8 first, u8 last)
         * with the pci_hotplug subsystem.
         */
        for (i = first; i <= last; ++i) {
-               slot = kmalloc(sizeof (struct slot), GFP_KERNEL);
+               slot = kzalloc(sizeof (struct slot), GFP_KERNEL);
                if (!slot)
                        goto error;
-               memset(slot, 0, sizeof (struct slot));
 
                hotplug_slot =
-                   kmalloc(sizeof (struct hotplug_slot), GFP_KERNEL);
+                       kzalloc(sizeof (struct hotplug_slot), GFP_KERNEL);
                if (!hotplug_slot)
                        goto error_slot;
-               memset(hotplug_slot, 0, sizeof (struct hotplug_slot));
                slot->hotplug_slot = hotplug_slot;
 
-               info = kmalloc(sizeof (struct hotplug_slot_info), GFP_KERNEL);
+               info = kzalloc(sizeof (struct hotplug_slot_info), GFP_KERNEL);
                if (!info)
                        goto error_hpslot;
-               memset(info, 0, sizeof (struct hotplug_slot_info));
                hotplug_slot->info = info;
 
                name = kmalloc(SLOT_NAME_SIZE, GFP_KERNEL);