public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
To: Thippeswamy Havalige <thippeswamy.havalige@amd.com>
Cc: bhelgaas@google.com, lpieralisi@kernel.org, kw@linux.com,
	robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
	linux-pci@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, michal.simek@amd.com,
	bharat.kumar.gogada@amd.com
Subject: Re: [PATCH v5 1/3] PCI: xilinx-cpm: Fix IRQ domain leak in error path of probe.
Date: Tue, 4 Mar 2025 21:16:08 +0530	[thread overview]
Message-ID: <20250304154608.5nmg4afotcp6hfym@thinkpad> (raw)
In-Reply-To: <20250224155025.782179-2-thippeswamy.havalige@amd.com>

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@amd.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

-- 
மணிவண்ணன் சதாசிவம்

  parent reply	other threads:[~2025-03-04 15:46 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-24 15:50 [PATCH v5 0/3] Add support for Versal Net CPM5N Root Port controller Thippeswamy Havalige
2025-02-24 15:50 ` [PATCH v5 1/3] PCI: xilinx-cpm: Fix IRQ domain leak in error path of probe Thippeswamy Havalige
2025-02-27  5:52   ` Havalige, Thippeswamy
2025-03-04 15:46   ` Manivannan Sadhasivam [this message]
2025-03-09 17:35     ` Krzysztof Wilczyński
2025-03-10  5:08       ` Havalige, Thippeswamy
2025-02-24 15:50 ` [PATCH v5 2/3] dt-bindings: PCI: xilinx-cpm: Add compatible string for CPM5NC Versal Net host Thippeswamy Havalige
2025-02-24 15:50 ` [PATCH v5 3/3] PCI: xilinx-cpm: Add support for Versal Net CPM5NC Root Port controller Thippeswamy Havalige
2025-03-10 17:07   ` Bjorn Helgaas
2025-03-11 15:59     ` Bjorn Helgaas
2025-03-11 16:21       ` Havalige, Thippeswamy
2025-03-09 17:30 ` [PATCH v5 0/3] Add support for Versal Net CPM5N " Krzysztof Wilczyński
2025-03-10  5:07   ` Havalige, Thippeswamy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250304154608.5nmg4afotcp6hfym@thinkpad \
    --to=manivannan.sadhasivam@linaro.org \
    --cc=bharat.kumar.gogada@amd.com \
    --cc=bhelgaas@google.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=kw@linux.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=michal.simek@amd.com \
    --cc=robh@kernel.org \
    --cc=thippeswamy.havalige@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox