From: Bjorn Helgaas <helgaas@kernel.org>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: "Christian Bruel" <christian.bruel@foss.st.com>,
"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>,
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
Subject: Re: [PATCH] PCI: stm32: Re-use existing error handling path in stm32_pcie_probe()
Date: Wed, 1 Oct 2025 09:52:23 -0500 [thread overview]
Message-ID: <20251001145223.GA226169@bhelgaas> (raw)
In-Reply-To: <e69ade3edcec4da2d5bfc66e0d03bbcb5a857021.1759169956.git.christophe.jaillet@wanadoo.fr>
On Mon, Sep 29, 2025 at 08:19:30PM +0200, Christophe JAILLET wrote:
> An error handling path is already available, so use it instead of hand
> writing the same code.
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
The stm32 driver hasn't been merged upstream yet, so I squashed this
into it:
https://git.kernel.org/cgit/linux/kernel/git/pci/pci.git/commit/?id=fd486e67e88c
Thank you!
> ---
> 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);
> --
> 2.51.0
>
>
prev parent reply other threads:[~2025-10-01 14:52 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
2025-10-01 14:52 ` Bjorn Helgaas [this message]
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=20251001145223.GA226169@bhelgaas \
--to=helgaas@kernel.org \
--cc=alexandre.torgue@foss.st.com \
--cc=bhelgaas@google.com \
--cc=christian.bruel@foss.st.com \
--cc=christophe.jaillet@wanadoo.fr \
--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