kernel: work: Remove meanless foreach for work Since call this function both in ```C k_spinlock_key_t key = k_spin_lock(&lock); bool need_flush = work_flush_locked(work, flusher); k_spin_unlock(&lock, key); ``` So, there are no flag_get change. Signed-off-by: Lingao Meng <menglingao@xiaomi.com>