X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fpci%2Fhotplug%2Ffakephp.c;h=060d74775d7be77d5a636cf892322d353d4cc5a0;hb=987b0145d94eecf292d8b301228356f44611ab7c;hp=71b80c23e8cecd70e8e80a6d97c6cfc1bbaa69fd;hpb=f7ed79d23a47594e7834d66a8f14449796d4f3e6;p=linux-2.6.git diff --git a/drivers/pci/hotplug/fakephp.c b/drivers/pci/hotplug/fakephp.c index 71b80c23e..060d74775 100644 --- a/drivers/pci/hotplug/fakephp.c +++ b/drivers/pci/hotplug/fakephp.c @@ -95,13 +95,15 @@ static int add_slot(struct pci_dev *dev) struct hotplug_slot *slot; int retval = -ENOMEM; - slot = kzalloc(sizeof(struct hotplug_slot), GFP_KERNEL); + slot = kmalloc(sizeof(struct hotplug_slot), GFP_KERNEL); if (!slot) goto error; + memset(slot, 0, sizeof(*slot)); - slot->info = kzalloc(sizeof(struct hotplug_slot_info), GFP_KERNEL); + slot->info = kmalloc(sizeof(struct hotplug_slot_info), GFP_KERNEL); if (!slot->info) goto error_slot; + memset(slot->info, 0, sizeof(struct hotplug_slot_info)); slot->info->power_status = 1; slot->info->max_bus_speed = PCI_SPEED_UNKNOWN; @@ -225,10 +227,11 @@ static void pci_rescan_bus(const struct pci_bus *bus) { unsigned int devfn; struct pci_dev *dev; - dev = kzalloc(sizeof(struct pci_dev), GFP_KERNEL); + dev = kmalloc(sizeof(struct pci_dev), GFP_KERNEL); if (!dev) return; + memset(dev, 0, sizeof(dev)); dev->bus = (struct pci_bus*)bus; dev->sysdata = bus->sysdata; for (devfn = 0; devfn < 0x100; devfn += 8) {