diff options
Diffstat (limited to 'drivers/pci/probe.c')
-rw-r--r-- | drivers/pci/probe.c | 3 |
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, | |||
1114 | if (!b) | 1114 | if (!b) |
1115 | return NULL; | 1115 | return NULL; |
1116 | 1116 | ||
1117 | dev = kmalloc(sizeof(*dev), GFP_KERNEL); | 1117 | dev = kzalloc(sizeof(*dev), GFP_KERNEL); |
1118 | if (!dev){ | 1118 | if (!dev){ |
1119 | kfree(b); | 1119 | kfree(b); |
1120 | return NULL; | 1120 | return NULL; |
@@ -1133,7 +1133,6 @@ struct pci_bus * pci_create_bus(struct device *parent, | |||
1133 | list_add_tail(&b->node, &pci_root_buses); | 1133 | list_add_tail(&b->node, &pci_root_buses); |
1134 | up_write(&pci_bus_sem); | 1134 | up_write(&pci_bus_sem); |
1135 | 1135 | ||
1136 | memset(dev, 0, sizeof(*dev)); | ||
1137 | dev->parent = parent; | 1136 | dev->parent = parent; |
1138 | dev->release = pci_release_bus_bridge_dev; | 1137 | dev->release = pci_release_bus_bridge_dev; |
1139 | dev_set_name(dev, "pci%04x:%02x", pci_domain_nr(b), bus); | 1138 | dev_set_name(dev, "pci%04x:%02x", pci_domain_nr(b), bus); |