[PATCH] PCI: xilinx-cpm: Fix reference count leak on error path

Subsystems: pci driver for xilinx versal cpm, pci native host bridge and endpoint drivers, pci subsystem, the rest

STALE2020d LANDED

Landed in mainline as ae191d2e513a on 2021-01-25.

2 messages, 2 authors, 2021-01-25 · open the first message on its own page

[PATCH] PCI: xilinx-cpm: Fix reference count leak on error path

From: Pan Bian <hidden>
Date: 2021-01-20 14:47:42

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 <redacted>
---
 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



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Re: [PATCH] PCI: xilinx-cpm: Fix reference count leak on error path

From: Lorenzo Pieralisi <hidden>
Date: 2021-01-25 17:31:13

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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help