linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] PCI: dra7xx: Add missing of_node_put() in dra7xx_pcie_init_irq_domain()
@ 2016-10-17 14:54 Wei Yongjun
  2016-11-11 21:38 ` Bjorn Helgaas
  0 siblings, 1 reply; 5+ messages in thread
From: Wei Yongjun @ 2016-10-17 14:54 UTC (permalink / raw)
  To: Kishon Vijay Abraham I, Bjorn Helgaas; +Cc: Wei Yongjun, linux-omap, linux-pci

From: Wei Yongjun <weiyongjun1@huawei.com>

This node pointer is returned by of_get_next_child() with refcount
incremented in this function. of_node_put() on it before exitting
this function on error.

This is detected by Coccinelle semantic patch.

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/pci/host/pci-dra7xx.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/pci/host/pci-dra7xx.c b/drivers/pci/host/pci-dra7xx.c
index 9595fad..79297e9 100644
--- a/drivers/pci/host/pci-dra7xx.c
+++ b/drivers/pci/host/pci-dra7xx.c
@@ -177,6 +177,7 @@ static int dra7xx_pcie_init_irq_domain(struct pcie_port *pp)
 					       &intx_domain_ops, pp);
 	if (!pp->irq_domain) {
 		dev_err(dev, "Failed to get a INTx IRQ domain\n");
+		of_node_put(pcie_intc_node);
 		return -ENODEV;
 	}


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-11-14 21:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-17 14:54 [PATCH -next] PCI: dra7xx: Add missing of_node_put() in dra7xx_pcie_init_irq_domain() Wei Yongjun
2016-11-11 21:38 ` Bjorn Helgaas
2016-11-12  7:09   ` Kishon Vijay Abraham I
2016-11-14 21:19     ` Bjorn Helgaas
2016-11-14 21:37       ` Heiko Stuebner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).