From: Jiawen Liu <1298662399@qq.com>
To: David Rhodes <david.rhodes@cirrus.com>,
Richard Fitzgerald <rf@opensource.cirrus.com>,
Charles Keepax <ckeepax@opensource.cirrus.com>,
Linus Walleij <linusw@kernel.org>
Cc: linux-sound@vger.kernel.org, patches@opensource.cirrus.com,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] pinctrl: cs42l43: fail probe if runtime PM setup fails
Date: Sun, 29 Nov 2026 17:44:22 +0400 [thread overview]
Message-ID: <tencent_99826EAE931660C42F52657EFD51112EA406@qq.com> (raw)
cs42l43_pin_probe() ignored a failure from devm_pm_runtime_enable(). The
helper rolls runtime PM back when action registration fails, but the
probe could still register pinctrl and GPIO providers that require
runtime resume for hardware access.
Propagate the setup error before requesting runtime idle and registering
either provider.
Fixes: d5282a539297 ("pinctrl: cs42l43: Add support for the cs42l43")
Signed-off-by: Jiawen Liu <1298662399@qq.com>
---
drivers/pinctrl/cirrus/pinctrl-cs42l43.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/pinctrl/cirrus/pinctrl-cs42l43.c b/drivers/pinctrl/cirrus/pinctrl-cs42l43.c
index a1c839b355578..71fc493de83e2 100644
--- a/drivers/pinctrl/cirrus/pinctrl-cs42l43.c
+++ b/drivers/pinctrl/cirrus/pinctrl-cs42l43.c
@@ -585,7 +585,10 @@ static int cs42l43_pin_probe(struct platform_device *pdev)
device_set_node(priv->dev, fwnode);
- devm_pm_runtime_enable(priv->dev);
+ ret = devm_pm_runtime_enable(priv->dev);
+ if (ret)
+ return dev_err_probe(priv->dev, ret,
+ "Failed to enable runtime PM\n");
pm_runtime_idle(priv->dev);
pctldev = devm_pinctrl_register(priv->dev, &cs42l43_pin_desc, priv);
--
2.34.1
next reply other threads:[~2026-11-29 13:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-29 13:44 Jiawen Liu [this message]
2026-11-30 9:57 ` Charles Keepax
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_99826EAE931660C42F52657EFD51112EA406@qq.com \
--to=1298662399@qq.com \
--cc=ckeepax@opensource.cirrus.com \
--cc=david.rhodes@cirrus.com \
--cc=linusw@kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=patches@opensource.cirrus.com \
--cc=rf@opensource.cirrus.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®