mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Patrice CHOTARD <patrice.chotard@foss.st.com>
To: Jiawen Liu <1298662399@qq.com>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Alexandre Torgue <alexandre.torgue@foss.st.com>
Cc: <linux-kernel@vger.kernel.org>,
	<linux-stm32@st-md-mailman.stormreply.com>,
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] memory: stm32-omm: fail probe if runtime PM setup fails
Date: Mon, 30 Nov 2026 08:00:36 +0100	[thread overview]
Message-ID: <e7790eb1-d7e6-4556-8087-cc6aa9f6608f@foss.st.com> (raw)
In-Reply-To: <tencent_531ED5DB1555404EEBA239A1010EFD02560A@qq.com>



On 11/29/26 14:44, Jiawen Liu wrote:
> stm32_omm_probe() ignored a failure from devm_pm_runtime_enable(). The
> helper rolls runtime PM back when action registration fails, but probe
> could continue and later require runtime resume while runtime PM was
> disabled.
> 
> Propagate the setup error before configuring the OMM or populating its
> children.
> 
> Fixes: 8181d061dcff ("memory: Add STM32 Octo Memory Manager driver")
> Signed-off-by: Jiawen Liu <1298662399@qq.com>
> ---
>  drivers/memory/stm32_omm.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/memory/stm32_omm.c b/drivers/memory/stm32_omm.c
> index e5d646e0a13cf..2d0c8fe7625be 100644
> --- a/drivers/memory/stm32_omm.c
> +++ b/drivers/memory/stm32_omm.c
> @@ -337,7 +337,9 @@ static int stm32_omm_probe(struct platform_device *pdev)
>  
>  	platform_set_drvdata(pdev, omm);
>  
> -	devm_pm_runtime_enable(dev);
> +	ret = devm_pm_runtime_enable(dev);
> +	if (ret)
> +		return dev_err_probe(dev, ret, "Failed to enable runtime PM\n");
>  
>  	/* check if OMM's resource access is granted */
>  	ret = stm32_omm_check_access(dev->of_node);

Hi Jiawen

Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>

Thanks
Patrice

      reply	other threads:[~2026-11-30  7:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-29 13:44 Jiawen Liu
2026-11-30  7:00 ` Patrice CHOTARD [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=e7790eb1-d7e6-4556-8087-cc6aa9f6608f@foss.st.com \
    --to=patrice.chotard@foss.st.com \
    --cc=1298662399@qq.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=krzk@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=mcoquelin.stm32@gmail.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

all inboxes | Powered by JetHome®