diff options
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) | |||
50 | tv64.tv_sec = rtc_tm_to_time64(&tm); | 50 | tv64.tv_sec = rtc_tm_to_time64(&tm); |
51 | 51 | ||
52 | #if BITS_PER_LONG == 32 | 52 | #if BITS_PER_LONG == 32 |
53 | if (tv64.tv_sec > INT_MAX) | 53 | if (tv64.tv_sec > INT_MAX) { |
54 | err = -ERANGE; | ||
54 | goto err_read; | 55 | goto err_read; |
56 | } | ||
55 | #endif | 57 | #endif |
56 | 58 | ||
57 | err = do_settimeofday64(&tv64); | 59 | err = do_settimeofday64(&tv64); |