diff --git a/kernel/unified/work_q.c b/kernel/unified/work_q.c index 92262839091..8c29270ca0a 100644 --- a/kernel/unified/work_q.c +++ b/kernel/unified/work_q.c @@ -71,6 +71,8 @@ static void work_timeout(struct _timeout *t) /* submit work to workqueue */ k_work_submit_to_queue(w->work_q, &w->work); + /* detach from workqueue, for cancel to return appropriate status */ + w->work_q = NULL; } void k_delayed_work_init(struct k_delayed_work *work, k_work_handler_t handler)