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:
Guðni Már Gilbert 2021-03-05 20:24:52 +00:00 committed by Anas Nashif
commit 94f88e502f

View file

@ -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)