* [PATCH] PCI: xilinx-cpm: Fix reference count leak on error path
@ 2021-01-20 14:37 Pan Bian
2021-01-25 17:29 ` Lorenzo Pieralisi
0 siblings, 1 reply; 2+ messages in thread
From: Pan Bian @ 2021-01-20 14:37 UTC (permalink / raw)
To: Lorenzo Pieralisi, Rob Herring, Bjorn Helgaas, Michal Simek,
Bharat Kumar Gogada
Cc: linux-pci, linux-arm-kernel, linux-kernel, Pan Bian
Also drop the reference count of the node on error path.
Fixes: 508f610648b9 ("PCI: xilinx-cpm: Add Versal CPM Root Port driver")
Signed-off-by: Pan Bian <bianpan2016@163.com>
---
drivers/pci/controller/pcie-xilinx-cpm.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/pci/controller/pcie-xilinx-cpm.c b/drivers/pci/controller/pcie-xilinx-cpm.c
index f92e0152e65e..67937facd90c 100644
--- a/drivers/pci/controller/pcie-xilinx-cpm.c
+++ b/drivers/pci/controller/pcie-xilinx-cpm.c
@@ -404,6 +404,7 @@ static int xilinx_cpm_pcie_init_irq_domain(struct xilinx_cpm_pcie_port *port)
return 0;
out:
xilinx_cpm_free_irq_domains(port);
+ of_node_put(pcie_intc_node);
dev_err(dev, "Failed to allocate IRQ domains\n");
return -ENOMEM;
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] PCI: xilinx-cpm: Fix reference count leak on error path
2021-01-20 14:37 [PATCH] PCI: xilinx-cpm: Fix reference count leak on error path Pan Bian
@ 2021-01-25 17:29 ` Lorenzo Pieralisi
0 siblings, 0 replies; 2+ messages in thread
From: Lorenzo Pieralisi @ 2021-01-25 17:29 UTC (permalink / raw)
To: Pan Bian, Rob Herring, Bharat Kumar Gogada, Bjorn Helgaas, Michal Simek
Cc: Lorenzo Pieralisi, linux-kernel, linux-pci, linux-arm-kernel
On Wed, 20 Jan 2021 06:37:45 -0800, Pan Bian wrote:
> Also drop the reference count of the node on error path.
Applied to pci/xilinx, thanks!
[1/1] PCI: xilinx-cpm: Fix reference count leak on error path
https://git.kernel.org/lpieralisi/pci/c/ae191d2e51
Thanks,
Lorenzo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-01-25 17:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-20 14:37 [PATCH] PCI: xilinx-cpm: Fix reference count leak on error path Pan Bian
2021-01-25 17:29 ` Lorenzo Pieralisi
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).