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: <20251002092001.20-1-alsp705@gmail.com>
Date: Thu,  2 Oct 2025 12:19:59 +0300
From: Alexandr Sapozhnkiov <alsp705@...il.com>
To: Alexandre Belloni <alexandre.belloni@...tlin.com>,
	linux-rtc@...r.kernel.org,
	linux-kernel@...r.kernel.org
Cc: Alexandr Sapozhnikov <alsp705@...il.com>,
	lvc-project@...uxtesting.org
Subject: [PATCH] rtc: fix error return in pm80x_rtc_set_time()

From: Alexandr Sapozhnikov <alsp705@...il.com>

The regmap_raw_write() function may return an error.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Signed-off-by: Alexandr Sapozhnikov <alsp705@...il.com>
---
 drivers/rtc/rtc-88pm80x.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/rtc/rtc-88pm80x.c b/drivers/rtc/rtc-88pm80x.c
index f40cc06b0979..71d4cc7e595c 100644
--- a/drivers/rtc/rtc-88pm80x.c
+++ b/drivers/rtc/rtc-88pm80x.c
@@ -136,9 +136,7 @@ static int pm80x_rtc_set_time(struct device *dev, struct rtc_time *tm)
 	buf[1] = (base >> 8) & 0xFF;
 	buf[2] = (base >> 16) & 0xFF;
 	buf[3] = (base >> 24) & 0xFF;
-	regmap_raw_write(info->map, PM800_RTC_EXPIRE2_1, buf, 4);
-
-	return 0;
+	return regmap_raw_write(info->map, PM800_RTC_EXPIRE2_1, buf, 4);
 }
 
 static int pm80x_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm)
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ