mirror of
https://github.com/apache/nuttx.git
synced 2026-05-28 11:56:10 +08:00
sched/wqueue: do work_cancel when worker is not null
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
This commit is contained in:
@@ -118,7 +118,10 @@ int work_queue(int qid, FAR struct work_s *work, worker_t worker,
|
|||||||
|
|
||||||
/* Remove the entry from the timer and work queue. */
|
/* Remove the entry from the timer and work queue. */
|
||||||
|
|
||||||
work_cancel(qid, work);
|
if (work->worker != NULL)
|
||||||
|
{
|
||||||
|
work_cancel(qid, work);
|
||||||
|
}
|
||||||
|
|
||||||
/* Initialize the work structure. */
|
/* Initialize the work structure. */
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user