Skip to content

Commit 8e66894

Browse files
nordic-krchnashif
authored andcommitted
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 <[email protected]>
1 parent 6112840 commit 8e66894

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/regulator/regulator_fixed.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ static void finalize_transition(struct driver_data_onoff *data,
115115
data->task = WORK_TASK_DELAY;
116116
data->notify = notify;
117117
rc = k_work_schedule(&data->dwork, K_USEC(delay_us));
118-
if (rc == 0) {
118+
if (rc >= 0) {
119119
return;
120120
}
121121
#endif /* CONFIG_MULTITHREADING */

0 commit comments

Comments
 (0)