diff options
author | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2025-04-08 17:42:03 +0300 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2025-05-25 00:31:12 +0300 |
commit | d8a0f6af1d36806d05883bdc5684aeae3689f927 (patch) | |
tree | dcc5b454be75fc517d92b7793f1d63b42fe23676 /drivers/rtc | |
parent | d370586746466166a57b709bfce8301f2adf97a0 (diff) | |
download | linux-d8a0f6af1d36806d05883bdc5684aeae3689f927.tar.xz |
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 <alexandre.belloni@bootlin.com>
Diffstat (limited to 'drivers/rtc')
-rw-r--r-- | drivers/rtc/interface.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/rtc/interface.c b/drivers/rtc/interface.c index aaf76406cd7d..dc741ba29fa3 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; } |