From: Geert Uytterhoeven Date: Sun, 15 Mar 2009 19:14:37 +0000 (+0100) Subject: PCI: Use kzalloc() in pci_create_bus() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6a3b3e26803fc823058fbb05abb5e0d92a52e1bd;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git PCI: Use kzalloc() in pci_create_bus() Signed-off-by: Geert Uytterhoeven Signed-off-by: Jesse Barnes --- diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 23362e8c696f..9e7d642e66b0 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -1114,7 +1114,7 @@ struct pci_bus * pci_create_bus(struct device *parent, if (!b) return NULL; - dev = kmalloc(sizeof(*dev), GFP_KERNEL); + dev = kzalloc(sizeof(*dev), GFP_KERNEL); if (!dev){ kfree(b); return NULL; @@ -1133,7 +1133,6 @@ struct pci_bus * pci_create_bus(struct device *parent, list_add_tail(&b->node, &pci_root_buses); up_write(&pci_bus_sem); - memset(dev, 0, sizeof(*dev)); dev->parent = parent; dev->release = pci_release_bus_bridge_dev; dev_set_name(dev, "pci%04x:%02x", pci_domain_nr(b), bus);