Module: xenomai-3
Branch: stable-3.0.x
Commit: 93d3a6ea0b550812d9fb30af312b298da73cc99e
URL:    
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=93d3a6ea0b550812d9fb30af312b298da73cc99e

Author: Philippe Gerum <[email protected]>
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 af36eb1..f039202 100644
--- a/kernel/cobalt/posix/timerfd.c
+++ b/kernel/cobalt/posix/timerfd.c
@@ -173,8 +173,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
[email protected]
https://xenomai.org/mailman/listinfo/xenomai-git

Reply via email to