lkml.org 
[lkml]   [2021]   [Mar]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.11 488/775] PCI: xilinx-cpm: Fix reference count leak on error path
    Date
    From: Pan Bian <bianpan2016@163.com>

    [ Upstream commit ae191d2e513ae5274224777ae67018a584074a28 ]

    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>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    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 f92e0152e65e3..67937facd90cd 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.27.0


    \
     
     \ /
      Last update: 2021-03-02 05:11    [W:4.072 / U:0.208 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site