[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250304154608.5nmg4afotcp6hfym@thinkpad>
Date: Tue, 4 Mar 2025 21:16:08 +0530
From: Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>
To: Thippeswamy Havalige <thippeswamy.havalige@....com>
Cc: bhelgaas@...gle.com, lpieralisi@...nel.org, kw@...ux.com,
robh@...nel.org, krzk+dt@...nel.org, conor+dt@...nel.org,
linux-pci@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, michal.simek@....com,
bharat.kumar.gogada@....com
Subject: Re: [PATCH v5 1/3] PCI: xilinx-cpm: Fix IRQ domain leak in error
path of probe.
On Mon, Feb 24, 2025 at 09:20:22PM +0530, Thippeswamy Havalige wrote:
> The IRQ domain allocated for the PCIe controller is not freed if
> resource_list_first_type returns NULL, leading to a resource leak.
>
> This fix ensures properly cleaning up the allocated IRQ domain in the error
> path.
>
Missing Fixes tag.
> Signed-off-by: Thippeswamy Havalige <thippeswamy.havalige@....com>
> ---
> drivers/pci/controller/pcie-xilinx-cpm.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/pci/controller/pcie-xilinx-cpm.c b/drivers/pci/controller/pcie-xilinx-cpm.c
> index 81e8bfae53d0..660b12fc4631 100644
> --- a/drivers/pci/controller/pcie-xilinx-cpm.c
> +++ b/drivers/pci/controller/pcie-xilinx-cpm.c
> @@ -583,8 +583,10 @@ static int xilinx_cpm_pcie_probe(struct platform_device *pdev)
> return err;
>
> bus = resource_list_first_type(&bridge->windows, IORESOURCE_BUS);
> - if (!bus)
> + if (!bus) {
> + xilinx_cpm_free_irq_domains(port);
Why can't you use existing 'err_parse_dt' label? If the reason is the name, just
change it to actual error case. Like, 'err_free_irq_domains'.
- Mani
--
மணிவண்ணன் சதாசிவம்
Powered by blists - more mailing lists