From 8e66894d4eb17d7f00120d287072df662d24f1a5 Mon Sep 17 00:00:00 2001 From: Krzysztof Chruscinski Date: Thu, 23 Sep 2021 18:01:44 +0200 Subject: [PATCH] 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 --- drivers/regulator/regulator_fixed.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/regulator_fixed.c b/drivers/regulator/regulator_fixed.c index f48d0831afb..ba40935a107 100644 --- a/drivers/regulator/regulator_fixed.c +++ b/drivers/regulator/regulator_fixed.c @@ -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 */