From: Maud Spierings via B4 Relay <devnull+maudspierings.gocontroll.com@kernel.org>
To: Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org,
Maud Spierings <maudspierings@gocontroll.com>
Subject: [PATCH] rtc: pcf85063: replace dev_err+return with return dev_err_probe
Date: Tue, 04 Mar 2025 09:14:52 +0100 [thread overview]
Message-ID: <20250304-rtc_dev_err_probe-v1-1-9dcc042ad17e@gocontroll.com> (raw)
From: Maud Spierings <maudspierings@gocontroll.com>
Replace the dev_err plus return combo with return dev_err_probe() this
actually communicates the error type when it occurs and helps debugging
hardware issues.
Signed-off-by: Maud Spierings <maudspierings@gocontroll.com>
---
I had some issues with a pcf85063a this change helped debugging it,
hopefully it can help someone else in the future as well.
---
drivers/rtc/rtc-pcf85063.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/rtc/rtc-pcf85063.c b/drivers/rtc/rtc-pcf85063.c
index 905986c616559b87826d1102dbc25614f7dcbcbb..650e45876be5e88d96b0ffabaab204168c8d355c 100644
--- a/drivers/rtc/rtc-pcf85063.c
+++ b/drivers/rtc/rtc-pcf85063.c
@@ -591,8 +591,7 @@ static int pcf85063_probe(struct i2c_client *client)
err = regmap_read(pcf85063->regmap, PCF85063_REG_CTRL1, &tmp);
if (err) {
- dev_err(&client->dev, "RTC chip is not present\n");
- return err;
+ return dev_err_probe(&client->dev, err, "RTC chip is not present\n");
}
pcf85063->rtc = devm_rtc_allocate_device(&client->dev);
---
base-commit: cd3215bbcb9d4321def93fea6cfad4d5b42b9d1d
change-id: 20250304-rtc_dev_err_probe-ae3268fec5bd
Best regards,
--
Maud Spierings <maudspierings@gocontroll.com>
next reply other threads:[~2025-03-04 8:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-04 8:14 Maud Spierings via B4 Relay [this message]
2025-04-01 10:02 ` [PATCH] rtc: pcf85063: replace dev_err+return with return dev_err_probe Alexandre Belloni
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=20250304-rtc_dev_err_probe-v1-1-9dcc042ad17e@gocontroll.com \
--to=devnull+maudspierings.gocontroll.com@kernel.org \
--cc=alexandre.belloni@bootlin.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
--cc=maudspierings@gocontroll.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