Skip to content

Commit

Permalink
[os] fix device_mutex_free_logic (#67)
Browse files Browse the repository at this point in the history
- free mutex when DEVICE_MUTEX_IS_INIT
  • Loading branch information
step0035 authored Feb 16, 2023
1 parent 38f8e66 commit 075a163
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion component/os/os_dep/device_lock.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ void device_mutex_free(RT_DEV_LOCK_E device)
_lock lock;
_irqL irqL;
rtw_enter_critical(&lock, &irqL);
if(!DEVICE_MUTEX_IS_INIT(device)){
if(DEVICE_MUTEX_IS_INIT(device)){
rtw_mutex_free(&device_mutex[device]);
DEVICE_MUTEX_CLR_INIT(device);
}
Expand Down

0 comments on commit 075a163

Please sign in to comment.