kernel: work: remove unused if statement
Condition of work == NULL is checked before, so there is no need to check it again. Signed-off-by: Lixin Guo <lixinx.guo@intel.com>
This commit is contained in:
parent
82b290ef48
commit
d4826d874e
1 changed files with 21 additions and 24 deletions
|
@ -586,6 +586,7 @@ static void work_queue_main(void *workq_ptr, void *p2, void *p3)
|
|||
struct k_work *work = NULL;
|
||||
k_work_handler_t handler = NULL;
|
||||
k_spinlock_key_t key = k_spin_lock(&lock);
|
||||
bool yield;
|
||||
|
||||
/* Check for and prepare any new work. */
|
||||
node = sys_slist_get(&queue->pending);
|
||||
|
@ -644,9 +645,6 @@ static void work_queue_main(void *workq_ptr, void *p2, void *p3)
|
|||
|
||||
k_spin_unlock(&lock, key);
|
||||
|
||||
if (work != NULL) {
|
||||
bool yield;
|
||||
|
||||
__ASSERT_NO_MSG(handler != NULL);
|
||||
handler(work);
|
||||
|
||||
|
@ -674,7 +672,6 @@ static void work_queue_main(void *workq_ptr, void *p2, void *p3)
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void k_work_queue_init(struct k_work_q *queue)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue