summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaud Spierings <maudspierings@gocontroll.com>2025-03-04 09:14:52 +0100
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2025-04-01 12:01:53 +0200
commit119e90a3a64d9dd48bcf4c2d4fc13ba6bb7d940d (patch)
treecec8f1a7eef2a5aa1d68c31f54af78a5e5036c10
parent2b7cbd98495f6ee4cd6422fe77828a19e9edf87f (diff)
rtc: pcf85063: replace dev_err+return with return dev_err_probe
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> Link: https://lore.kernel.org/r/20250304-rtc_dev_err_probe-v1-1-9dcc042ad17e@gocontroll.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-rw-r--r--drivers/rtc/rtc-pcf85063.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/rtc/rtc-pcf85063.c b/drivers/rtc/rtc-pcf85063.c
index 73848f764559..4fa5c4ecdd5a 100644
--- a/drivers/rtc/rtc-pcf85063.c
+++ b/drivers/rtc/rtc-pcf85063.c
@@ -591,10 +591,8 @@ static int pcf85063_probe(struct i2c_client *client)
i2c_set_clientdata(client, pcf85063);
err = regmap_read(pcf85063->regmap, PCF85063_REG_SC, &tmp);
- if (err) {
- dev_err(&client->dev, "RTC chip is not present\n");
- return err;
- }
+ if (err)
+ return dev_err_probe(&client->dev, err, "RTC chip is not present\n");
pcf85063->rtc = devm_rtc_allocate_device(&client->dev);
if (IS_ERR(pcf85063->rtc))