kernel: work_q: fix return value in non-error case
A recent patch allowed an error code to be returned even though the execution path treated it as a non-error condition. Clear the code before returning. Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
This commit is contained in:
parent
f64cd1a5db
commit
d8146d6c6d
|
@ -99,7 +99,9 @@ int k_delayed_work_submit_to_queue(struct k_work_q *work_q,
|
|||
/* -EALREADY indicates the work has already completed so this
|
||||
* is likely a recurring work.
|
||||
*/
|
||||
if (err < 0 && err != -EALREADY) {
|
||||
if (err == -EALREADY) {
|
||||
err = 0;
|
||||
} else if (err < 0) {
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue