Module: xenomai-3 Branch: next Commit: 7ca7ce462ddbb6717d867b7d9d23abc9d7c33be4 URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=7ca7ce462ddbb6717d867b7d9d23abc9d7c33be4
Author: Philippe Gerum <r...@xenomai.org> Date: Tue Apr 3 19:17:02 2018 +0200 cobalt/timerfd: fix error check --- kernel/cobalt/posix/timerfd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/cobalt/posix/timerfd.c b/kernel/cobalt/posix/timerfd.c index f4411d4..6102060 100644 --- a/kernel/cobalt/posix/timerfd.c +++ b/kernel/cobalt/posix/timerfd.c @@ -174,8 +174,8 @@ COBALT_SYSCALL(timerfd_create, lostage, (int clockid, int flags)) return -EINVAL; clock = cobalt_clock_find(clockid); - if (clock == NULL) - return -EINVAL; + if (IS_ERR(clock)) + return PTR_ERR(clock); tfd = xnmalloc(sizeof(*tfd)); if (tfd == NULL) _______________________________________________ Xenomai-git mailing list Xenomai-git@xenomai.org https://xenomai.org/mailman/listinfo/xenomai-git