aboutsummaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorGravatar Tom Rix <trix@redhat.com> 2022-03-26 12:42:36 -0700
committerGravatar Alexandre Belloni <alexandre.belloni@bootlin.com> 2022-03-29 22:45:50 +0200
commit915593a7a663b2ad08b895a5f3ba8b19d89d4ebf (patch)
treeb0921c38fe1b4ac67b40cfb221562b5c01c50f78 /include/linux
parentrtc: gamecube: Fix refcount leak in gamecube_rtc_read_offset_from_sram (diff)
downloadlinux-915593a7a663b2ad08b895a5f3ba8b19d89d4ebf.tar.gz
linux-915593a7a663b2ad08b895a5f3ba8b19d89d4ebf.tar.bz2
linux-915593a7a663b2ad08b895a5f3ba8b19d89d4ebf.zip
rtc: check if __rtc_read_time was successful
Clang static analysis reports this issue interface.c:810:8: warning: Passed-by-value struct argument contains uninitialized data now = rtc_tm_to_ktime(tm); ^~~~~~~~~~~~~~~~~~~ tm is set by a successful call to __rtc_read_time() but its return status is not checked. Check if it was successful before setting the enabled flag. Move the decl of err to function scope. Fixes: 2b2f5ff00f63 ("rtc: interface: ignore expired timers when enqueuing new timers") Signed-off-by: Tom Rix <trix@redhat.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20220326194236.2916310-1-trix@redhat.com
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions