summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/time/tick-broadcast.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c
index ef77b16ad5df..fad3f789beec 100644
--- a/kernel/time/tick-broadcast.c
+++ b/kernel/time/tick-broadcast.c
@@ -693,6 +693,13 @@ int __tick_broadcast_oneshot_control(enum tick_broadcast_state state)
ktime_t now;
/*
+ * If there is no broadcast device, tell the caller not to go
+ * into deep idle.
+ */
+ if (!tick_broadcast_device.evtdev)
+ return -EBUSY;
+
+ /*
* Periodic mode does not care about the enter/exit of power
* states
*/