diff options
-rw-r--r-- | kernel/time/ntp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c index 5ac593267a26..5f1bb8e2008f 100644 --- a/kernel/time/ntp.c +++ b/kernel/time/ntp.c | |||
@@ -650,13 +650,13 @@ int do_adjtimex(struct timex *txc) | |||
650 | 650 | ||
651 | if (txc->modes & ADJ_SETOFFSET) { | 651 | if (txc->modes & ADJ_SETOFFSET) { |
652 | struct timespec delta; | 652 | struct timespec delta; |
653 | if ((unsigned long)txc->time.tv_usec >= NSEC_PER_SEC) | ||
654 | return -EINVAL; | ||
655 | delta.tv_sec = txc->time.tv_sec; | 653 | delta.tv_sec = txc->time.tv_sec; |
656 | delta.tv_nsec = txc->time.tv_usec; | 654 | delta.tv_nsec = txc->time.tv_usec; |
657 | if (!(txc->modes & ADJ_NANO)) | 655 | if (!(txc->modes & ADJ_NANO)) |
658 | delta.tv_nsec *= 1000; | 656 | delta.tv_nsec *= 1000; |
659 | timekeeping_inject_offset(&delta); | 657 | result = timekeeping_inject_offset(&delta); |
658 | if (result) | ||
659 | return result; | ||
660 | } | 660 | } |
661 | 661 | ||
662 | getnstimeofday(&ts); | 662 | getnstimeofday(&ts); |