drivers: regulator: Fix k_work_schedule return code handling
k_work_schedule may return other non-negative value than 0. When driver was adapted to the new k_work API that was not taken into account. Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
This commit is contained in:
parent
611284021c
commit
8e66894d4e
1 changed files with 1 additions and 1 deletions
|
@ -115,7 +115,7 @@ static void finalize_transition(struct driver_data_onoff *data,
|
|||
data->task = WORK_TASK_DELAY;
|
||||
data->notify = notify;
|
||||
rc = k_work_schedule(&data->dwork, K_USEC(delay_us));
|
||||
if (rc == 0) {
|
||||
if (rc >= 0) {
|
||||
return;
|
||||
}
|
||||
#endif /* CONFIG_MULTITHREADING */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue