Linux PCI subsystem development
 help / color / mirror / Atom feed
From: Christian Bruel <christian.bruel@foss.st.com>
To: "Christophe JAILLET" <christophe.jaillet@wanadoo.fr>,
	"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
	"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
	"Manivannan Sadhasivam" <mani@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Maxime Coquelin" <mcoquelin.stm32@gmail.com>,
	"Alexandre Torgue" <alexandre.torgue@foss.st.com>
Cc: <linux-kernel@vger.kernel.org>, <kernel-janitors@vger.kernel.org>,
	<linux-pci@vger.kernel.org>,
	<linux-stm32@st-md-mailman.stormreply.com>,
	<linux-arm-kernel@lists.infradead.org>,
	Dan Carpenter <dan.carpenter@linaro.org>
Subject: Re: [PATCH] PCI: stm32: Re-use existing error handling path in stm32_pcie_probe()
Date: Wed, 1 Oct 2025 10:32:36 +0200	[thread overview]
Message-ID: <e2fb89ee-21fe-4500-aa84-41cc9abc010b@foss.st.com> (raw)
In-Reply-To: <e69ade3edcec4da2d5bfc66e0d03bbcb5a857021.1759169956.git.christophe.jaillet@wanadoo.fr>

Hi Christophe,

On 9/29/25 20:19, Christophe JAILLET wrote:
> An error handling path is already available, so use it instead of hand
> writing the same code.

This fix is pending:

https://lore.kernel.org/linux-pci/0b8b8cde-d273-442c-8537-3fa95885476b@foss.st.com/

Bjorn, Manivannan, gentle ping

thank you

Christian

> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
>   drivers/pci/controller/dwc/pcie-stm32.c | 10 ++++------
>   1 file changed, 4 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/pci/controller/dwc/pcie-stm32.c b/drivers/pci/controller/dwc/pcie-stm32.c
> index 964fa6f674c8..96a5fb893af4 100644
> --- a/drivers/pci/controller/dwc/pcie-stm32.c
> +++ b/drivers/pci/controller/dwc/pcie-stm32.c
> @@ -287,18 +287,16 @@ static int stm32_pcie_probe(struct platform_device *pdev)
>   
>   	ret = pm_runtime_set_active(dev);
>   	if (ret < 0) {
> -		clk_disable_unprepare(stm32_pcie->clk);
> -		stm32_remove_pcie_port(stm32_pcie);
> -		return dev_err_probe(dev, ret, "Failed to activate runtime PM\n");
> +		dev_err_probe(dev, ret, "Failed to activate runtime PM\n");
> +		goto err_disable_clk;
>   	}
>   
>   	pm_runtime_no_callbacks(dev);
>   
>   	ret = devm_pm_runtime_enable(dev);
>   	if (ret < 0) {
> -		clk_disable_unprepare(stm32_pcie->clk);
> -		stm32_remove_pcie_port(stm32_pcie);
> -		return dev_err_probe(dev, ret, "Failed to enable runtime PM\n");
> +		dev_err_probe(dev, ret, "Failed to enable runtime PM\n");
> +		goto err_disable_clk;
>   	}
>   
>   	ret = dw_pcie_host_init(&stm32_pcie->pci.pp);


  reply	other threads:[~2025-10-01  8:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-29 18:19 [PATCH] PCI: stm32: Re-use existing error handling path in stm32_pcie_probe() Christophe JAILLET
2025-10-01  8:32 ` Christian Bruel [this message]
2025-10-01 14:52 ` Bjorn Helgaas

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=e2fb89ee-21fe-4500-aa84-41cc9abc010b@foss.st.com \
    --to=christian.bruel@foss.st.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=bhelgaas@google.com \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=dan.carpenter@linaro.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=kwilczynski@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=lpieralisi@kernel.org \
    --cc=mani@kernel.org \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=robh@kernel.org \
    /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