aboutsummaryrefslogtreecommitdiff
path: root/kernel/time/tick-common.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/time/tick-common.c')
-rw-r--r--kernel/time/tick-common.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/time/tick-common.c b/kernel/time/tick-common.c
index d8e328cf481..e93af50726e 100644
--- a/kernel/time/tick-common.c
+++ b/kernel/time/tick-common.c
@@ -18,6 +18,7 @@
#include <linux/percpu.h>
#include <linux/profile.h>
#include <linux/sched.h>
+#include <linux/module.h>
#include <asm/irq_regs.h>
@@ -261,6 +262,9 @@ void tick_check_new_device(struct clock_event_device *newdev)
goto out_bc;
}
+ if (!try_module_get(newdev->owner))
+ return;
+
/*
* Replace the eventually existing device by the new
* device. If the current device is the broadcast device, do