Date: Wed, 10 Jan 2018 02:28:10 +0000 (UTC) From: Ian Lepore <ian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327756 - head/sys/dev/iicbus Message-ID: <201801100228.w0A2SA4k038025@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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)); } /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201801100228.w0A2SA4k038025>