aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug/shpchp_hpc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci/hotplug/shpchp_hpc.c')
-rw-r--r--drivers/pci/hotplug/shpchp_hpc.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/pci/hotplug/shpchp_hpc.c b/drivers/pci/hotplug/shpchp_hpc.c
index c32a1b16704f..1a6b5448f81d 100644
--- a/drivers/pci/hotplug/shpchp_hpc.c
+++ b/drivers/pci/hotplug/shpchp_hpc.c
@@ -1390,15 +1390,13 @@ int shpc_init(struct controller * ctrl, struct pci_dev * pdev)
1390 ctrl->pci_dev = pdev; /* pci_dev of the P2P bridge */ 1390 ctrl->pci_dev = pdev; /* pci_dev of the P2P bridge */
1391 1391
1392 spin_lock_init(&list_lock); 1392 spin_lock_init(&list_lock);
1393 php_ctlr = (struct php_ctlr_state_s *) kmalloc(sizeof(struct php_ctlr_state_s), GFP_KERNEL); 1393 php_ctlr = kzalloc(sizeof(*php_ctlr), GFP_KERNEL);
1394 1394
1395 if (!php_ctlr) { /* allocate controller state data */ 1395 if (!php_ctlr) { /* allocate controller state data */
1396 err("%s: HPC controller memory allocation error!\n", __FUNCTION__); 1396 err("%s: HPC controller memory allocation error!\n", __FUNCTION__);
1397 goto abort; 1397 goto abort;
1398 } 1398 }
1399 1399
1400 memset(php_ctlr, 0, sizeof(struct php_ctlr_state_s));
1401
1402 php_ctlr->pci_dev = pdev; /* save pci_dev in context */ 1400 php_ctlr->pci_dev = pdev; /* save pci_dev in context */
1403 1401
1404 if ((pdev->vendor == PCI_VENDOR_ID_AMD) || (pdev->device == 1402 if ((pdev->vendor == PCI_VENDOR_ID_AMD) || (pdev->device ==