time: Fix sign bug in NTP mult overflow warning
[cascardo/linux.git] / kernel / time / timekeeping.c
index 29a7d67..2dc0646 100644 (file)
@@ -1330,7 +1330,7 @@ static __always_inline void timekeeping_apply_adjustment(struct timekeeper *tk,
         *
         * XXX - TODO: Doc ntp_error calculation.
         */
-       if (tk->tkr.mult + mult_adj < mult_adj) {
+       if ((mult_adj > 0) && (tk->tkr.mult + mult_adj < mult_adj)) {
                /* NTP adjustment caused clocksource mult overflow */
                WARN_ON_ONCE(1);
                return;