diff --git a/libs/libc/sched/task_setcanceltype.c b/libs/libc/sched/task_setcanceltype.c index 6715327804..0130d07e04 100644 --- a/libs/libc/sched/task_setcanceltype.c +++ b/libs/libc/sched/task_setcanceltype.c @@ -55,5 +55,5 @@ int task_setcanceltype(int type, FAR int *oldtype) /* Check the requested cancellation type */ - return (type == TASK_CANCEL_ASYNCHRONOUS) ? OK : ENOSYS; + return (type == TASK_CANCEL_ASYNCHRONOUS) ? OK : EINVAL; }