diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-11-14 13:47:15 -0600 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-11-14 13:47:15 -0600 |
commit | b7bbf9935fb793ef8dc42c61a459d74e8606a799 (patch) | |
tree | f7f77165bbb6918982ef9137698f3fe4180f5155 /drivers/rtc/hctosys.c | |
parent | 47e624c03043f544ab797ee073d958cfa57dbf51 (diff) | |
parent | 9bde0afb7a906f1dabdba37162551565740b862d (diff) |
Merge tag 'rtc-4.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux
Pull RTC driver fixes from Alexandre Belloni:
- cmos: stop exporting alarms when not supported
- hctosys: correctly report range error
- pcf2127: fix a memory leak
* tag 'rtc-4.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux:
rtc: pcf2127: fix a kmemleak caused in pcf2127_i2c_gather_write
rtc: hctosys: Add missing range error reporting
rtc: cmos: Do not export alarm rtc_ops when we do not support alarms
Diffstat (limited to 'drivers/rtc/hctosys.c')
-rw-r--r-- | drivers/rtc/hctosys.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/rtc/hctosys.c b/drivers/rtc/hctosys.c index e79f2a181ad2..b9ec4a16db1f 100644 --- a/drivers/rtc/hctosys.c +++ b/drivers/rtc/hctosys.c @@ -50,8 +50,10 @@ static int __init rtc_hctosys(void) tv64.tv_sec = rtc_tm_to_time64(&tm); #if BITS_PER_LONG == 32 - if (tv64.tv_sec > INT_MAX) + if (tv64.tv_sec > INT_MAX) { + err = -ERANGE; goto err_read; + } #endif err = do_settimeofday64(&tv64); |