diff options
author | Pan Bian <bianpan2016@163.com> | 2021-01-20 15:37:45 +0100 |
---|---|---|
committer | Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> | 2021-01-25 18:27:41 +0100 |
commit | ae191d2e513ae5274224777ae67018a584074a28 (patch) | |
tree | 35602f7ad8d9b7b6397d1bc514cc0de6c16465fd /drivers/pci | |
parent | Linux 5.11-rc3 (diff) | |
download | linux-ae191d2e513ae5274224777ae67018a584074a28.tar.xz linux-ae191d2e513ae5274224777ae67018a584074a28.zip |
PCI: xilinx-cpm: Fix reference count leak on error path
Also drop the reference count of the node on error path.
Link: https://lore.kernel.org/r/20210120143745.699-1-bianpan2016@163.com
Fixes: 508f610648b9 ("PCI: xilinx-cpm: Add Versal CPM Root Port driver")
Signed-off-by: Pan Bian <bianpan2016@163.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/controller/pcie-xilinx-cpm.c | 1 |
1 files changed, 1 insertions, 0 deletions
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; |