]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - arch/arm64/kernel/pci.c
Merge tag 'pci-v4.13-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaa...
[karo-tx-linux.git] / arch / arm64 / kernel / pci.c
index efcc351c518f5b4ec39cf08a57eccebe2b90bf8e..e2b7e4f9cc3180d7a1059cb4983c3739ca4be19c 100644 (file)
@@ -106,7 +106,10 @@ int pcibios_root_bridge_prepare(struct pci_host_bridge *bridge)
        if (!acpi_disabled) {
                struct pci_config_window *cfg = bridge->bus->sysdata;
                struct acpi_device *adev = to_acpi_device(cfg->parent);
+               struct device *bus_dev = &bridge->bus->dev;
+
                ACPI_COMPANION_SET(&bridge->dev, adev);
+               set_dev_node(bus_dev, acpi_get_node(acpi_device_handle(adev)));
        }
 
        return 0;
@@ -189,8 +192,10 @@ struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root)
                return NULL;
 
        root_ops = kzalloc_node(sizeof(*root_ops), GFP_KERNEL, node);
-       if (!root_ops)
+       if (!root_ops) {
+               kfree(ri);
                return NULL;
+       }
 
        ri->cfg = pci_acpi_setup_ecam_mapping(root);
        if (!ri->cfg) {