diff options
Diffstat (limited to 'kernel/time/clockevents.c')
-rw-r--r-- | kernel/time/clockevents.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/time/clockevents.c b/kernel/time/clockevents.c index 822beebe664a..5fb139fef9fa 100644 --- a/kernel/time/clockevents.c +++ b/kernel/time/clockevents.c | |||
@@ -78,6 +78,11 @@ int clockevents_program_event(struct clock_event_device *dev, ktime_t expires, | |||
78 | unsigned long long clc; | 78 | unsigned long long clc; |
79 | int64_t delta; | 79 | int64_t delta; |
80 | 80 | ||
81 | if (unlikely(expires.tv64 < 0)) { | ||
82 | WARN_ON_ONCE(1); | ||
83 | return -ETIME; | ||
84 | } | ||
85 | |||
81 | delta = ktime_to_ns(ktime_sub(expires, now)); | 86 | delta = ktime_to_ns(ktime_sub(expires, now)); |
82 | 87 | ||
83 | if (delta <= 0) | 88 | if (delta <= 0) |