aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/pcie/portdrv_core.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/pci/pcie/portdrv_core.c b/drivers/pci/pcie/portdrv_core.c
index 079bbc3ed4f8..52c4e6fd6fd4 100644
--- a/drivers/pci/pcie/portdrv_core.c
+++ b/drivers/pci/pcie/portdrv_core.c
@@ -297,6 +297,10 @@ int pcie_port_device_register(struct pci_dev *dev)
297 int status, capabilities, irq_mode, i, nr_serv; 297 int status, capabilities, irq_mode, i, nr_serv;
298 int vectors[PCIE_PORT_DEVICE_MAXSERVICES]; 298 int vectors[PCIE_PORT_DEVICE_MAXSERVICES];
299 299
300 capabilities = get_port_device_capability(dev);
301 if (!capabilities)
302 return -ENODEV;
303
300 port_data = kzalloc(sizeof(*port_data), GFP_KERNEL); 304 port_data = kzalloc(sizeof(*port_data), GFP_KERNEL);
301 if (!port_data) 305 if (!port_data)
302 return -ENOMEM; 306 return -ENOMEM;
@@ -304,8 +308,6 @@ int pcie_port_device_register(struct pci_dev *dev)
304 308
305 port_data->port_type = dev->pcie_type; 309 port_data->port_type = dev->pcie_type;
306 310
307 capabilities = get_port_device_capability(dev);
308
309 irq_mode = assign_interrupt_mode(dev, vectors, capabilities); 311 irq_mode = assign_interrupt_mode(dev, vectors, capabilities);
310 if (irq_mode == PCIE_PORT_NO_IRQ) { 312 if (irq_mode == PCIE_PORT_NO_IRQ) {
311 /* 313 /*