rtc: fix error return in pm80x_rtc_set_time()
PATCH 1/1 rtc: fix error return in pm80x_rtc_set_time()
From: Alexandr Sapozhnikov <[email protected]>
The regmap_raw_write() function may return an error.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Signed-off-by Alexandr Sapozhnikov <[email protected]>
--- drivers/rtc/rtc-88pm80x.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/rtc/rtc-88pm80x.c +1 -3
@@ -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)
Signature · 1 line
2.43.0