From: Alexandre Belloni Date: Tue, 8 Apr 2025 14:42:03 +0000 (+0200) Subject: rtc: interface: silence KMSAN warning X-Git-Tag: v6.16-rc1~41^2~28 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d8a0f6af1d36806d05883bdc5684aeae3689f927;p=thirdparty%2Flinux.git rtc: interface: silence KMSAN warning KMSAN complains that alarm->time can be used uninitialized. Pass 0 to trace_rtc_read_alarm in case it has not been set. Link: https://lore.kernel.org/r/20250408144203.3869821-1-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni --- diff --git a/drivers/rtc/interface.c b/drivers/rtc/interface.c index aaf76406cd7d7..dc741ba29fa35 100644 --- a/drivers/rtc/interface.c +++ b/drivers/rtc/interface.c @@ -205,7 +205,7 @@ static int rtc_read_alarm_internal(struct rtc_device *rtc, mutex_unlock(&rtc->ops_lock); - trace_rtc_read_alarm(rtc_tm_to_time64(&alarm->time), err); + trace_rtc_read_alarm(err?0:rtc_tm_to_time64(&alarm->time), err); return err; }