sched/wqueue: do work_cancel when worker is not null
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
This commit is contained in:
parent
22fa59074f
commit
63039b80e1
@ -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. */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user