aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/pci_64.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel/pci_64.c')
-rw-r--r--arch/powerpc/kernel/pci_64.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c
index afee470de924..6fa9a0a5c8db 100644
--- a/arch/powerpc/kernel/pci_64.c
+++ b/arch/powerpc/kernel/pci_64.c
@@ -330,7 +330,7 @@ struct pci_dev *of_create_pci_dev(struct device_node *node,
330 struct pci_dev *dev; 330 struct pci_dev *dev;
331 const char *type; 331 const char *type;
332 332
333 dev = kmalloc(sizeof(struct pci_dev), GFP_KERNEL); 333 dev = kzalloc(sizeof(struct pci_dev), GFP_KERNEL);
334 if (!dev) 334 if (!dev)
335 return NULL; 335 return NULL;
336 type = get_property(node, "device_type", NULL); 336 type = get_property(node, "device_type", NULL);
@@ -339,7 +339,6 @@ struct pci_dev *of_create_pci_dev(struct device_node *node,
339 339
340 DBG(" create device, devfn: %x, type: %s\n", devfn, type); 340 DBG(" create device, devfn: %x, type: %s\n", devfn, type);
341 341
342 memset(dev, 0, sizeof(struct pci_dev));
343 dev->bus = bus; 342 dev->bus = bus;
344 dev->sysdata = node; 343 dev->sysdata = node;
345 dev->dev.parent = bus->bridge; 344 dev->dev.parent = bus->bridge;