diff options
-rw-r--r-- | include/linux/ktime.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/linux/ktime.h b/include/linux/ktime.h index 04817b1ca019..0c8bd45c8206 100644 --- a/include/linux/ktime.h +++ b/include/linux/ktime.h | |||
@@ -108,7 +108,11 @@ static inline ktime_t timeval_to_ktime(struct timeval tv) | |||
108 | */ | 108 | */ |
109 | static inline int ktime_compare(const ktime_t cmp1, const ktime_t cmp2) | 109 | static inline int ktime_compare(const ktime_t cmp1, const ktime_t cmp2) |
110 | { | 110 | { |
111 | return ktime_sub(cmp1, cmp2); | 111 | if (cmp1 < cmp2) |
112 | return -1; | ||
113 | if (cmp1 > cmp2) | ||
114 | return 1; | ||
115 | return 0; | ||
112 | } | 116 | } |
113 | 117 | ||
114 | /** | 118 | /** |