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]
Date:   Wed, 19 Jan 2022 12:27:21 -0500
From:   Hugo Villeneuve <hugo@...ovil.com>
To:     Alessandro Zummo <a.zummo@...ertech.it>,
        Alexandre Belloni <alexandre.belloni@...tlin.com>
Cc:     hugo@...ovil.com, Hugo Villeneuve <hvilleneuve@...onoff.com>,
        linux-rtc@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] rtc: pcf2127: add error message if reading CLKOUT register fails

From: Hugo Villeneuve <hvilleneuve@...onoff.com>

If reading CLKOUT register fails, the probe operation will be aborted
without a meaningful error message.

Signed-off-by: Hugo Villeneuve <hvilleneuve@...onoff.com>
---
 drivers/rtc/rtc-pcf2127.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/rtc/rtc-pcf2127.c b/drivers/rtc/rtc-pcf2127.c
index cea10fdbb010..3d1f57e54372 100644
--- a/drivers/rtc/rtc-pcf2127.c
+++ b/drivers/rtc/rtc-pcf2127.c
@@ -709,8 +709,10 @@ static int pcf2127_probe(struct device *dev, struct regmap *regmap,
 	}
 
 	ret = regmap_read(pcf2127->regmap, PCF2127_REG_CLKOUT, &val);
-	if (ret < 0)
+	if (ret < 0) {
+		dev_err(dev, "reading CLKOUT register failed\n");
 		return ret;
+	}
 
 	if (!(val & PCF2127_BIT_CLKOUT_OTPR)) {
 		ret = regmap_set_bits(pcf2127->regmap, PCF2127_REG_CLKOUT,
-- 
2.30.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ