semaphore/sem_trywait.c: Remove redundancy leave_critical_section

Remove redundant leave_critical_section() call in nxsem_trywait_slow() as the
critical section is properly released at the exit point via 'out' label, making
the intermediate call unnecessary and eliminating code duplication.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
This commit is contained in:
hujun5
2025-07-14 18:40:18 +08:00
committed by Xiang Xiao
parent 0b96303fda
commit 37ecb28eb1
-1
View File
@@ -118,7 +118,6 @@ int nxsem_trywait_slow(FAR sem_t *sem)
atomic_fetch_add(NXSEM_COUNT(sem), 1);
}
leave_critical_section(flags);
goto out;
}