summaryrefslogtreecommitdiffstats
path: root/drivers/pci/probe.c
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2009-03-15 20:14:37 +0100
committerJesse Barnes <jbarnes@virtuousgeek.org>2009-03-20 18:48:15 +0100
commit6a3b3e26803fc823058fbb05abb5e0d92a52e1bd (patch)
treef868b0ef9c3d5d69f693fb73346f7f71266db092 /drivers/pci/probe.c
parentPCI: allow assignment of memory resources with a specified alignment (diff)
downloadlinux-6a3b3e26803fc823058fbb05abb5e0d92a52e1bd.tar.xz
linux-6a3b3e26803fc823058fbb05abb5e0d92a52e1bd.zip
PCI: Use kzalloc() in pci_create_bus()
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci/probe.c')
-rw-r--r--drivers/pci/probe.c3
1 files changed, 1 insertions, 2 deletions
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);