Author: ian Date: Wed Jan 10 02:28:10 2018 New Revision: 327756 URL: https://svnweb.freebsd.org/changeset/base/327756
Log: Bugfix: on RTC chips with a 32-bit binary counter, after reading the time, return immediately rather than falling through to the logic that reads BCD-encoded time. Modified: head/sys/dev/iicbus/ds13rtc.c Modified: head/sys/dev/iicbus/ds13rtc.c ============================================================================== --- head/sys/dev/iicbus/ds13rtc.c Wed Jan 10 00:18:47 2018 (r327755) +++ head/sys/dev/iicbus/ds13rtc.c Wed Jan 10 02:28:10 2018 (r327756) @@ -364,9 +364,8 @@ ds13rtc_gettime(device_t dev, struct timespec *ts) /* If the chip counts time in binary, we just read and return it. */ if (sc->flags & SC_F_BINARY) { - if ((err = read_timeword(sc, &ts->tv_sec)) != 0) - return (err); ts->tv_nsec = 0; + return (read_timeword(sc, &ts->tv_sec)); } /* _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"