summaryrefslogtreecommitdiff
path: root/drivers/rtc/rtc-test.c
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@linux-mips.org>2018-11-05 03:48:25 +0000
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2018-11-07 17:13:55 +0100
commit7ce9a992ffde8ce93d5ae5767362a5c7389ae895 (patch)
treeae1639a18c2cb86671a1703785b29dc9c6de51ca /drivers/rtc/rtc-test.c
parentfbb974ba693bbfb4e24a62181ef16d4e45febc37 (diff)
rtc: hctosys: Add missing range error reporting
Fix an issue with the 32-bit range error path in `rtc_hctosys' where no error code is set and consequently the successful preceding call result from `rtc_read_time' is propagated to `rtc_hctosys_ret'. This in turn makes any subsequent call to `hctosys_show' incorrectly report in sysfs that the system time has been set from this RTC while it has not. Set the error to ERANGE then if we can't express the result due to an overflow. Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org> Fixes: b3a5ac42ab18 ("rtc: hctosys: Ensure system time doesn't overflow time_t") Cc: stable@vger.kernel.org # 4.17+ Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'drivers/rtc/rtc-test.c')
0 files changed, 0 insertions, 0 deletions