Commit 93d3a6ea authored by Philippe Gerum's avatar Philippe Gerum
Browse files

cobalt/timerfd: fix error check

parent 6e34bb5f
...@@ -173,8 +173,8 @@ COBALT_SYSCALL(timerfd_create, lostage, (int clockid, int flags)) ...@@ -173,8 +173,8 @@ COBALT_SYSCALL(timerfd_create, lostage, (int clockid, int flags))
return -EINVAL; return -EINVAL;
clock = cobalt_clock_find(clockid); clock = cobalt_clock_find(clockid);
if (clock == NULL) if (IS_ERR(clock))
return -EINVAL; return PTR_ERR(clock);
tfd = xnmalloc(sizeof(*tfd)); tfd = xnmalloc(sizeof(*tfd));
if (tfd == NULL) if (tfd == NULL)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment