aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/timer.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/timer.h')
-rw-r--r--include/linux/timer.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/timer.h b/include/linux/timer.h
index b1dc583..72f3a77 100644
--- a/include/linux/timer.h
+++ b/include/linux/timer.h
@@ -78,8 +78,9 @@ extern unsigned long next_timer_interrupt(void);
* Timers with an ->expired field in the past will be executed in the next
* timer tick.
*/
-static inline void add_timer(struct timer_list * timer)
+static inline void add_timer(struct timer_list *timer)
{
+ BUG_ON(timer_pending(timer));
__mod_timer(timer, timer->expires);
}