wqueue: fix NO leave_critical_section() when only CONFIG_SCHED_HPWORK

Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
ligd 2021-12-22 13:26:10 +08:00 committed by Xiang Xiao
parent b128ce334f
commit e5420c8eee

View file

@ -108,6 +108,7 @@ int work_queue(int qid, FAR struct work_s *work, worker_t worker,
FAR void *arg, clock_t delay)
{
irqstate_t flags;
int ret = OK;
/* Remove the entry from the timer and work queue. */
@ -160,11 +161,15 @@ int work_queue(int qid, FAR struct work_s *work, worker_t worker,
(wdparm_t)work);
}
}
else
#endif
{
ret = -EINVAL;
}
leave_critical_section(flags);
return OK;
return ret;
}
#endif /* CONFIG_SCHED_WORKQUEUE */