pthread_mutexattr_setprotocol: remove the unreached dead code

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
This commit is contained in:
guoshichao
2024-09-09 14:57:54 +08:00
committed by Xiang Xiao
parent c9223469d4
commit 3e66184f23
@@ -54,8 +54,6 @@ int pthread_mutexattr_setprotocol(FAR pthread_mutexattr_t *attr,
linfo("attr=%p protocol=%d\n", attr, protocol); linfo("attr=%p protocol=%d\n", attr, protocol);
DEBUGASSERT(attr != NULL); DEBUGASSERT(attr != NULL);
if (protocol >= PTHREAD_PRIO_NONE && protocol <= PTHREAD_PRIO_PROTECT)
{
switch (protocol) switch (protocol)
{ {
case PTHREAD_PRIO_NONE: case PTHREAD_PRIO_NONE:
@@ -81,11 +79,8 @@ int pthread_mutexattr_setprotocol(FAR pthread_mutexattr_t *attr,
#endif /* CONFIG_PRIORITY_PROTECT */ #endif /* CONFIG_PRIORITY_PROTECT */
default: default:
return ENOTSUP; return EINVAL;
} }
return OK; return OK;
} }
return EINVAL;
}