diff options
author | Nick Crews <ncrews@chromium.org> | 2019-10-04 08:26:08 -0600 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2019-10-14 17:49:17 +0200 |
commit | 9aa0d0be3856749c3be08089fe12a1f4494a030b (patch) | |
tree | 617da4fb8a41edf387b1774620ca9dc945d12e9e /drivers/rtc/rtc-zynqmp.c | |
parent | 147dae76dbb9b20ba48385911c6fc04bf038a64a (diff) | |
download | linux-9aa0d0be3856749c3be08089fe12a1f4494a030b.tar.gz linux-9aa0d0be3856749c3be08089fe12a1f4494a030b.tar.bz2 linux-9aa0d0be3856749c3be08089fe12a1f4494a030b.zip |
rtc: wilco-ec: Handle reading invalid times
If the RTC HW returns an invalid time, the rtc_year_days()
call would crash. This patch adds error logging in this
situation, and removes the tm_yday and tm_wday calculations.
These fields should not be relied upon by userspace
according to man rtc, and thus we don't need to calculate
them.
Signed-off-by: Nick Crews <ncrews@chromium.org>
Reviewed-by: Daniel Campello <campello@chromium.org>
Link: https://lore.kernel.org/r/20191004142608.170159-1-ncrews@chromium.org
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'drivers/rtc/rtc-zynqmp.c')
0 files changed, 0 insertions, 0 deletions