Merge branch 'fixes-for-linus' of git://git.linaro.org/people/mszyprowski/linux-dma...
[firefly-linux-kernel-4.4.55.git] / drivers / xen / pci.c
index 66057075d6e2664c4411b5168c17ba3ac1828938..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)
@@ -116,7 +116,7 @@ static int xen_add_device(struct device *dev)
                        &manage_pci_ext);
        } else {
                struct physdev_manage_pci manage_pci = {
-                       .bus    = pci_dev->bus->number,
+                       .bus    = pci_dev->bus->number,
                        .devfn  = pci_dev->devfn,
                };