igb_uio: bind error if PCIe bridge

Probe function should exit immediately if pcie bridge detected

Signed-off-by: Darren Edamura <darren.edamura@broadcom.com>
Signed-off-by: Rahul Gupta <rahul.gupta@broadcom.com>
Signed-off-by: Scott Branden <scott.branden@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
This commit is contained in:
Darren Edamura 2018-03-29 09:37:35 -07:00 committed by Thomas Monjalon
parent 7bdccb9307
commit 6f0841b770

View File

@ -473,6 +473,11 @@ igbuio_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
void *map_addr; void *map_addr;
int err; int err;
if (pci_is_bridge(dev)) {
dev_warn(&dev->dev, "Ignoring PCI bridge device\n");
return -ENODEV;
}
udev = kzalloc(sizeof(struct rte_uio_pci_dev), GFP_KERNEL); udev = kzalloc(sizeof(struct rte_uio_pci_dev), GFP_KERNEL);
if (!udev) if (!udev)
return -ENOMEM; return -ENOMEM;