提交 3a10766d 编写于 作者: B Bjorn Helgaas

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: NBjorn Helgaas <bhelgaas@google.com>
Reviewed-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
上级 2291ec09
...@@ -879,6 +879,7 @@ static void mvebu_pcie_msi_enable(struct mvebu_pcie *pcie) ...@@ -879,6 +879,7 @@ static void mvebu_pcie_msi_enable(struct mvebu_pcie *pcie)
return; return;
pcie->msi = of_pci_find_msi_chip_by_node(msi_node); pcie->msi = of_pci_find_msi_chip_by_node(msi_node);
of_node_put(msi_node);
if (pcie->msi) if (pcie->msi)
pcie->msi->dev = &pcie->pdev->dev; pcie->msi->dev = &pcie->pdev->dev;
......
...@@ -514,6 +514,7 @@ static int xgene_pcie_msi_enable(struct pci_bus *bus) ...@@ -514,6 +514,7 @@ static int xgene_pcie_msi_enable(struct pci_bus *bus)
if (!bus->msi) if (!bus->msi)
return -ENODEV; return -ENODEV;
of_node_put(msi_node);
bus->msi->dev = &bus->dev; bus->msi->dev = &bus->dev;
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册