[coreboot-gerrit] New patch to review for coreboot: mediatek/mt8173: Init dow struct value before using it
Martin Roth (martinroth@google.com)
gerrit at coreboot.org
Wed Jul 13 18:27:48 CEST 2016
Martin Roth (martinroth at google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/15652
-gerrit
commit 8c7a52ed598acddefd689af92ff742a050b517e3
Author: Martin Roth <martinroth at chromium.org>
Date: Wed Jul 13 10:25:16 2016 -0600
mediatek/mt8173: Init dow struct value before using it
rtc_display() in setup_rtc() was displaying the day-of-week value
without having initialized the time->dow entry.
Fixes coverity warning 1357459: Uninitialized scalar variable
Change-Id: Ib0011b8540c862b1556120e09b45abd497087877
Signed-off-by: Martin Roth <martinroth at chromium.org>
---
src/soc/mediatek/mt8173/rtc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/soc/mediatek/mt8173/rtc.c b/src/soc/mediatek/mt8173/rtc.c
index 4147a0f..22ba768 100644
--- a/src/soc/mediatek/mt8173/rtc.c
+++ b/src/soc/mediatek/mt8173/rtc.c
@@ -88,6 +88,8 @@ int rtc_get(struct rtc_time *time)
time->mon = value;
pwrap_read(RTC_TC_YEA, &value);
time->year = (value + RTC_MIN_YEAR_OFFSET) % 100;
+ pwrap_read(RTC_TC_DOW, &value);
+ time->dow = value;
return 0;
}
More information about the coreboot-gerrit
mailing list