From: Ben Dooks <ben.dooks@codethink.co.uk>
To: lgirdwood@gmail.com, broonie@kernel.org, linux-kernel@vger.kernel.org
Cc: Ben Dooks <ben.dooks@codethink.co.uk>
Subject: [PATCH] regulator: max20411: show failure on register
Date: Thu, 5 Mar 2026 18:46:23 +0000 [thread overview]
Message-ID: <20260305184623.2603269-1-ben.dooks@codethink.co.uk> (raw)
It is easy to use %pe to print a error-pointer so add this
to the dev_err() if the devm_regulator_register() fails.
Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
drivers/regulator/max20411-regulator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/regulator/max20411-regulator.c b/drivers/regulator/max20411-regulator.c
index 02d7009ea0e61..6c0ebb970e902 100644
--- a/drivers/regulator/max20411-regulator.c
+++ b/drivers/regulator/max20411-regulator.c
@@ -133,7 +133,7 @@ static int max20411_probe(struct i2c_client *client)
max20411->rdev = devm_regulator_register(max20411->dev, &max20411->desc, &cfg);
if (IS_ERR(max20411->rdev))
- dev_err(max20411->dev, "Failed to register regulator\n");
+ dev_err(max20411->dev, "Failed to register regulator: %pe\n", max20411->rdev);
return PTR_ERR_OR_ZERO(max20411->rdev);
}
--
2.37.2.352.g3c44437643
next reply other threads:[~2026-03-05 19:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-05 18:46 Ben Dooks [this message]
2026-03-06 11:57 ` Mark Brown
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=20260305184623.2603269-1-ben.dooks@codethink.co.uk \
--to=ben.dooks@codethink.co.uk \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.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
all inboxes | Powered by JetHome®