lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20250304-rtc_dev_err_probe-v1-1-9dcc042ad17e@gocontroll.com>
Date: Tue, 04 Mar 2025 09:14:52 +0100
From: Maud Spierings via B4 Relay <devnull+maudspierings.gocontroll.com@...nel.org>
To: Alexandre Belloni <alexandre.belloni@...tlin.com>
Cc: linux-rtc@...r.kernel.org, linux-kernel@...r.kernel.org, 
 Maud Spierings <maudspierings@...ontroll.com>
Subject: [PATCH] rtc: pcf85063: replace dev_err+return with return
 dev_err_probe

From: Maud Spierings <maudspierings@...ontroll.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@...ontroll.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@...ontroll.com>



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ