rockchip/common: Set weekday to unknown in rtc_get()
Prior to this patch, time->wday was not being initialized in rtc_get(), but was still being used by rtc_display() to print a day. Set to -1 which gets printed as "unknown ". Fixes coverity issue 1357459 - Uninitialized scalar variable Change-Id: Idecb7968f854df997b58a342e1a06a879f299394 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/15899 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Julius Werner <jwerner@chromium.org>
This commit is contained in:
parent
5e07a7e474
commit
a7a9c463fd
|
@ -199,5 +199,7 @@ int rtc_get(struct rtc_time *time)
|
|||
ret |= rk808_read(RTC_YEAR, &value);
|
||||
time->year = bcd2bin(value);
|
||||
|
||||
time->wday = -1; /* unknown */
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue