Skip to content

Commit 119e90a

Browse files
SpieringsAEalexandrebelloni
authored andcommitted
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>
1 parent 2b7cbd9 commit 119e90a

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

drivers/rtc/rtc-pcf85063.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -591,10 +591,8 @@ static int pcf85063_probe(struct i2c_client *client)
591591
i2c_set_clientdata(client, pcf85063);
592592

593593
err = regmap_read(pcf85063->regmap, PCF85063_REG_SC, &tmp);
594-
if (err) {
595-
dev_err(&client->dev, "RTC chip is not present\n");
596-
return err;
597-
}
594+
if (err)
595+
return dev_err_probe(&client->dev, err, "RTC chip is not present\n");
598596

599597
pcf85063->rtc = devm_rtc_allocate_device(&client->dev);
600598
if (IS_ERR(pcf85063->rtc))

0 commit comments

Comments
 (0)