lib: os: Simplify z_impl_z_sys_mutex_kernel_unlock
Remove one redundant if() statement already included with k_mutex_unlock() Signed-off-by: Guðni Már Gilbert <gudni.m.g@gmail.com>
This commit is contained in:
parent
d60a2e816f
commit
94f88e502f
1 changed files with 1 additions and 6 deletions
|
@ -60,12 +60,7 @@ int z_impl_z_sys_mutex_kernel_unlock(struct sys_mutex *mutex)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (kernel_mutex->owner != _current) {
|
return k_mutex_unlock(kernel_mutex);
|
||||||
return -EPERM;
|
|
||||||
}
|
|
||||||
|
|
||||||
k_mutex_unlock(kernel_mutex);
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int z_vrfy_z_sys_mutex_kernel_unlock(struct sys_mutex *mutex)
|
static inline int z_vrfy_z_sys_mutex_kernel_unlock(struct sys_mutex *mutex)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue