lib: cmsis_rtos_v1: replace an else case Replace an else-if case in osSemaphoreWait with else to account for both EBUSY and EAGAIN return values from k_sem_take. The return value would be 0 for osSemaphoreWait in both cases. Signed-off-by: Niranjhana N <niranjhana.n@intel.com>
diff --git a/lib/cmsis_rtos_v1/cmsis_semaphore.c b/lib/cmsis_rtos_v1/cmsis_semaphore.c index 69c93f2..41da2b9 100644 --- a/lib/cmsis_rtos_v1/cmsis_semaphore.c +++ b/lib/cmsis_rtos_v1/cmsis_semaphore.c
@@ -68,11 +68,9 @@ */ if (status == 0) { return k_sem_count_get(semaphore) + 1; - } else if (status == -EAGAIN) { + } else { return 0; } - - return -1; } /**