From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wei Yongjun Subject: [PATCH -next] PCI: dra7xx: Add missing of_node_put() in dra7xx_pcie_init_irq_domain() Date: Mon, 17 Oct 2016 14:54:37 +0000 Message-ID: <1476716077-30379-1-git-send-email-weiyj.lk@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: Sender: linux-pci-owner@vger.kernel.org To: Kishon Vijay Abraham I , Bjorn Helgaas Cc: Wei Yongjun , linux-omap@vger.kernel.org, linux-pci@vger.kernel.org List-Id: linux-omap@vger.kernel.org From: Wei Yongjun 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 --- 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; }