]> Git Repo - linux.git/commitdiff
xen/pci: Check for PCI bridge before using it.
authorZhang, Yang Z <[email protected]>
Tue, 22 May 2012 08:40:16 +0000 (08:40 +0000)
committerKonrad Rzeszutek Wilk <[email protected]>
Wed, 30 May 2012 14:16:35 +0000 (10:16 -0400)
Some SR-IOV devices may use more than one bus number, but there is no real bridges
because that have internal routing mechanism. So need to check whether the bridge is
existing before using it.

Signed-off-by: Yang Zhang <[email protected]>
Signed-off-by: Konrad Rzeszutek Wilk <[email protected]>
drivers/xen/pci.c

index b84bf0b6cc34c4fd34bfd35015bd8057f0ddf6b9..18fff88254ebd9bd9e4c76b1df63ecf40dc4e139 100644 (file)
@@ -59,7 +59,7 @@ static int xen_add_device(struct device *dev)
 
 #ifdef CONFIG_ACPI
                handle = DEVICE_ACPI_HANDLE(&pci_dev->dev);
-               if (!handle)
+               if (!handle && pci_dev->bus->bridge)
                        handle = DEVICE_ACPI_HANDLE(pci_dev->bus->bridge);
 #ifdef CONFIG_PCI_IOV
                if (!handle && pci_dev->is_virtfn)
This page took 0.05687 seconds and 4 git commands to generate.