Commit 9d534265 authored by Bjorn Helgaas's avatar Bjorn Helgaas

Merge branch 'pci/host-xgene' into next

* pci/host-xgene:
  PCI: xgene: Configure PCIe MPS settings
  PCI: xgene: Fix double free on init error
parents f08bf55e 7da7a1a6
......@@ -246,14 +246,11 @@ static int xgene_pcie_ecam_init(struct pci_config_window *cfg, u32 ipversion)
ret = xgene_get_csr_resource(adev, &csr);
if (ret) {
dev_err(dev, "can't get CSR resource\n");
kfree(port);
return ret;
}
port->csr_base = devm_ioremap_resource(dev, &csr);
if (IS_ERR(port->csr_base)) {
kfree(port);
return -ENOMEM;
}
if (IS_ERR(port->csr_base))
return PTR_ERR(port->csr_base);
port->cfg_base = cfg->win;
port->version = ipversion;
......@@ -638,7 +635,7 @@ static int xgene_pcie_probe_bridge(struct platform_device *pdev)
struct device_node *dn = dev->of_node;
struct xgene_pcie_port *port;
resource_size_t iobase = 0;
struct pci_bus *bus;
struct pci_bus *bus, *child;
int ret;
LIST_HEAD(res);
......@@ -681,6 +678,8 @@ static int xgene_pcie_probe_bridge(struct platform_device *pdev)
pci_scan_child_bus(bus);
pci_assign_unassigned_bus_resources(bus);
list_for_each_entry(child, &bus->children, node)
pcie_bus_configure_settings(child);
pci_bus_add_devices(bus);
return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment