diff options
Diffstat (limited to 'kernel/time/timekeeping.c')
-rw-r--r-- | kernel/time/timekeeping.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index 342408cf68dd..9d09777a213f 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c | |||
@@ -604,6 +604,12 @@ static struct timespec timekeeping_suspend_time; | |||
604 | */ | 604 | */ |
605 | static void __timekeeping_inject_sleeptime(struct timespec *delta) | 605 | static void __timekeeping_inject_sleeptime(struct timespec *delta) |
606 | { | 606 | { |
607 | if (!timespec_valid(delta)) { | ||
608 | printk(KERN_WARN "__timekeeping_inject_sleeptime: Invalid " | ||
609 | "sleep delta value!\n"); | ||
610 | return; | ||
611 | } | ||
612 | |||
607 | xtime = timespec_add(xtime, *delta); | 613 | xtime = timespec_add(xtime, *delta); |
608 | wall_to_monotonic = timespec_sub(wall_to_monotonic, *delta); | 614 | wall_to_monotonic = timespec_sub(wall_to_monotonic, *delta); |
609 | total_sleep_time = timespec_add(total_sleep_time, *delta); | 615 | total_sleep_time = timespec_add(total_sleep_time, *delta); |