diff options
author | Mark Brown <broonie@kernel.org> | 2018-06-01 11:40:46 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2018-06-01 11:40:46 +0100 |
commit | 1e82572e5f806782cc1bf06e6d22905c28b0a9f5 (patch) | |
tree | c428a640fca2ee5c6bfe259482b941f5e0ece927 /drivers/rtc/hctosys.c | |
parent | 29e8549d35499289ce6211a553f956a2ab9a3905 (diff) | |
parent | 86a04ba0955e3c806ed301cf178f1e130f1cb785 (diff) |
Merge branch 'linux-linaro-lsk-v4.9' into linux-linaro-lsk-v4.9-rtlsk-v4.9-18.05-rt
Diffstat (limited to 'drivers/rtc/hctosys.c')
-rw-r--r-- | drivers/rtc/hctosys.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/rtc/hctosys.c b/drivers/rtc/hctosys.c index e1cfa06810ef..e79f2a181ad2 100644 --- a/drivers/rtc/hctosys.c +++ b/drivers/rtc/hctosys.c @@ -49,6 +49,11 @@ 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) + goto err_read; +#endif + err = do_settimeofday64(&tv64); dev_info(rtc->dev.parent, |