From: Wei Yongjun <weiyj.lk@gmail.com> To: Shawn Lin <shawn.lin@rock-chips.com>, Wenrui Li <wenrui.li@rock-chips.com>, Bjorn Helgaas <bhelgaas@google.com>, Heiko Stuebner <heiko@sntech.de> Cc: Wei Yongjun <weiyongjun1@huawei.com>, linux-pci@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH -next] PCI: rockchip: Add missing of_node_put() in rockchip_pcie_init_irq_domain() Date: Mon, 17 Oct 2016 14:57:22 +0000 [thread overview] Message-ID: <1476716242-31684-1-git-send-email-weiyj.lk@gmail.com> (raw) 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/pcie-rockchip.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/pci/host/pcie-rockchip.c b/drivers/pci/host/pcie-rockchip.c index e0b22da..ab88859 100644 --- a/drivers/pci/host/pcie-rockchip.c +++ b/drivers/pci/host/pcie-rockchip.c @@ -949,6 +949,7 @@ static int rockchip_pcie_init_irq_domain(struct rockchip_pcie *rockchip) &intx_domain_ops, rockchip); if (!rockchip->irq_domain) { dev_err(dev, "failed to get a INTx IRQ domain\n"); + of_node_put(intc); return -EINVAL; }
WARNING: multiple messages have this Message-ID (diff)
From: weiyj.lk@gmail.com (Wei Yongjun) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH -next] PCI: rockchip: Add missing of_node_put() in rockchip_pcie_init_irq_domain() Date: Mon, 17 Oct 2016 14:57:22 +0000 [thread overview] Message-ID: <1476716242-31684-1-git-send-email-weiyj.lk@gmail.com> (raw) 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/pcie-rockchip.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/pci/host/pcie-rockchip.c b/drivers/pci/host/pcie-rockchip.c index e0b22da..ab88859 100644 --- a/drivers/pci/host/pcie-rockchip.c +++ b/drivers/pci/host/pcie-rockchip.c @@ -949,6 +949,7 @@ static int rockchip_pcie_init_irq_domain(struct rockchip_pcie *rockchip) &intx_domain_ops, rockchip); if (!rockchip->irq_domain) { dev_err(dev, "failed to get a INTx IRQ domain\n"); + of_node_put(intc); return -EINVAL; }
next reply other threads:[~2016-10-17 14:57 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2016-10-17 14:57 Wei Yongjun [this message] 2016-10-17 14:57 ` [PATCH -next] PCI: rockchip: Add missing of_node_put() in rockchip_pcie_init_irq_domain() Wei Yongjun 2016-10-18 0:50 ` Shawn Lin 2016-10-18 0:50 ` Shawn Lin 2016-10-18 0:50 ` Shawn Lin 2016-11-11 21:45 ` Bjorn Helgaas 2016-11-11 21:45 ` Bjorn Helgaas
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1476716242-31684-1-git-send-email-weiyj.lk@gmail.com \ --to=weiyj.lk@gmail.com \ --cc=bhelgaas@google.com \ --cc=heiko@sntech.de \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-pci@vger.kernel.org \ --cc=linux-rockchip@lists.infradead.org \ --cc=shawn.lin@rock-chips.com \ --cc=weiyongjun1@huawei.com \ --cc=wenrui.li@rock-chips.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.