From d2c92705c54c9c24f2b8be57b968ad21a30412e5 Mon Sep 17 00:00:00 2001 From: Uwe Kleine-König Date: Mon, 11 Jul 2016 10:05:27 +0200 Subject: rtc: explicitly set tm_sec = 0 for drivers with minute accurancy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since all time members of the alarm data is initialized to -1 the drivers are responsible to set the tm_sec member to 0. Fixes: d68778b80dd7 ("rtc: initialize output parameter for read alarm to "uninitialized"") Signed-off-by: Uwe Kleine-König Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-rc5t583.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/rtc/rtc-rc5t583.c') diff --git a/drivers/rtc/rtc-rc5t583.c b/drivers/rtc/rtc-rc5t583.c index f28d57788951..68ce77414bdc 100644 --- a/drivers/rtc/rtc-rc5t583.c +++ b/drivers/rtc/rtc-rc5t583.c @@ -128,6 +128,7 @@ static int rc5t583_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alm) return ret; } + alm->time.tm_sec = 0; alm->time.tm_min = bcd2bin(alarm_data[0]); alm->time.tm_hour = bcd2bin(alarm_data[1]); alm->time.tm_mday = bcd2bin(alarm_data[2]); -- cgit v1.2.3