From: Jiawen Liu <1298662399@qq.com>
To: Patrice Chotard <patrice.chotard@foss.st.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: [PATCH] memory: stm32-omm: fail probe if runtime PM setup fails
Date: Sun, 29 Nov 2026 17:44:14 +0400 [thread overview]
Message-ID: <tencent_531ED5DB1555404EEBA239A1010EFD02560A@qq.com> (raw)
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
reply other threads:[~2026-11-29 13:44 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=tencent_531ED5DB1555404EEBA239A1010EFD02560A@qq.com \
--to=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 \
--cc=patrice.chotard@foss.st.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®