diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2018-06-06 23:10:18 +0200 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2018-06-06 23:10:18 +0200 |
commit | a7c9d4cf45e1352c3fcca0fabfdf9d7ff708d2ff (patch) | |
tree | daaf3cbe743e3ee34a85cf8f446de0cd63ec17fc /drivers/pci/probe.c | |
parent | Merge branch 'pci/portdrv' (diff) | |
parent | PCI: Enable PCI_DOMAINS along with generic PCI host controller (diff) | |
download | linux-a7c9d4cf45e1352c3fcca0fabfdf9d7ff708d2ff.tar.xz linux-a7c9d4cf45e1352c3fcca0fabfdf9d7ff708d2ff.zip |
Merge branch 'pci/resource'
- add managed interface to get PCI host bridge resources from OF (Jan
Kiszka)
- add support for unbinding generic PCI host controller (Jan Kiszka)
- fix memory leaks when unbinding generic PCI host controller (Jan Kiszka)
* pci/resource:
PCI: Enable PCI_DOMAINS along with generic PCI host controller
PCI: Add support for unbinding the generic PCI host controller
PCI: Rework of_pci_get_host_bridge_resources() to devm_of_pci_get_host_bridge_resources()
PCI: Use dev_printk() in of_pci_get_host_bridge_resources()
PCI: Pass struct device to of_pci_get_host_bridge_resources()
PCI: Rename of_pci_get_host_bridge_resources() device node parameter
PCI: Fix devm_pci_alloc_host_bridge() memory leak
PCI: Make pci_get_new_domain_nr() static
Diffstat (limited to 'drivers/pci/probe.c')
-rw-r--r-- | drivers/pci/probe.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 3a36d304ccd5..ac876e32de4b 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -526,12 +526,14 @@ static void devm_pci_release_host_bridge_dev(struct device *dev) if (bridge->release_fn) bridge->release_fn(bridge); + + pci_free_resource_list(&bridge->windows); } static void pci_release_host_bridge_dev(struct device *dev) { devm_pci_release_host_bridge_dev(dev); - pci_free_host_bridge(to_pci_host_bridge(dev)); + kfree(to_pci_host_bridge(dev)); } struct pci_host_bridge *pci_alloc_host_bridge(size_t priv) |