diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2015-08-04 21:54:04 +0200 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2015-08-20 19:02:50 +0200 |
commit | 3a10766d0624c72b978790dba864cf7d6160f89f (patch) | |
tree | 0ab210a8d02dc3a8bac23b4c322a43cf57e81c43 /drivers/pci | |
parent | PCI/MSI: Remove unused pcibios_msi_controller() hook (diff) | |
download | linux-3a10766d0624c72b978790dba864cf7d6160f89f.tar.xz linux-3a10766d0624c72b978790dba864cf7d6160f89f.zip |
PCI: Drop references acquired by of_parse_phandle()
of_parse_phandle() returns a device_node pointer with the refcount
incremented. We should dispose of this reference when we're finished.
Drop the reference acquired by of_parse_phandle().
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/host/pci-mvebu.c | 1 | ||||
-rw-r--r-- | drivers/pci/host/pci-xgene.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/drivers/pci/host/pci-mvebu.c b/drivers/pci/host/pci-mvebu.c index 70aa09556ec5..67ec5e1c99db 100644 --- a/drivers/pci/host/pci-mvebu.c +++ b/drivers/pci/host/pci-mvebu.c @@ -879,6 +879,7 @@ static void mvebu_pcie_msi_enable(struct mvebu_pcie *pcie) return; pcie->msi = of_pci_find_msi_chip_by_node(msi_node); + of_node_put(msi_node); if (pcie->msi) pcie->msi->dev = &pcie->pdev->dev; diff --git a/drivers/pci/host/pci-xgene.c b/drivers/pci/host/pci-xgene.c index a9dfb70d623a..4c2fb1f78d62 100644 --- a/drivers/pci/host/pci-xgene.c +++ b/drivers/pci/host/pci-xgene.c @@ -514,6 +514,7 @@ static int xgene_pcie_msi_enable(struct pci_bus *bus) if (!bus->msi) return -ENODEV; + of_node_put(msi_node); bus->msi->dev = &bus->dev; return 0; } |