* [PATCH] memory: stm32-omm: fail probe if runtime PM setup fails
@ 2026-11-29 13:44 Jiawen Liu
2026-11-30 7:00 ` Patrice CHOTARD
0 siblings, 1 reply; 2+ messages in thread
From: Jiawen Liu @ 2026-11-29 13:44 UTC (permalink / raw)
To: Patrice Chotard, Krzysztof Kozlowski, Maxime Coquelin, Alexandre Torgue
Cc: linux-kernel, linux-stm32, linux-arm-kernel
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);
--
2.34.1
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] memory: stm32-omm: fail probe if runtime PM setup fails
2026-11-29 13:44 [PATCH] memory: stm32-omm: fail probe if runtime PM setup fails Jiawen Liu
@ 2026-11-30 7:00 ` Patrice CHOTARD
0 siblings, 0 replies; 2+ messages in thread
From: Patrice CHOTARD @ 2026-11-30 7:00 UTC (permalink / raw)
To: Jiawen Liu, Krzysztof Kozlowski, Maxime Coquelin, Alexandre Torgue
Cc: linux-kernel, linux-stm32, linux-arm-kernel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-30 7:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-29 13:44 [PATCH] memory: stm32-omm: fail probe if runtime PM setup fails Jiawen Liu
2026-11-30 7:00 ` Patrice CHOTARD
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®