diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2014-08-01 04:28:48 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2014-08-27 05:17:48 -0400 |
commit | 88299c9bdb109e0d95abdca648065631ff91b2cb (patch) | |
tree | dd590830b5dbd223d03abf7d6586d88abe44b8aa /fs | |
parent | 42594970022d223bf8f30d3aa22819e24779d6f6 (diff) |
timerfd: Remove an always true check
We would have returned -EINVAL earlier if ticks wasn't set.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Link: http://lkml.kernel.org/r/20140801082848.GF28869@mwanda
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/timerfd.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/timerfd.c b/fs/timerfd.c index 80c350216ea8..b46ffa94372a 100644 --- a/fs/timerfd.c +++ b/fs/timerfd.c | |||
@@ -333,8 +333,7 @@ static long timerfd_ioctl(struct file *file, unsigned int cmd, unsigned long arg | |||
333 | spin_lock_irq(&ctx->wqh.lock); | 333 | spin_lock_irq(&ctx->wqh.lock); |
334 | if (!timerfd_canceled(ctx)) { | 334 | if (!timerfd_canceled(ctx)) { |
335 | ctx->ticks = ticks; | 335 | ctx->ticks = ticks; |
336 | if (ticks) | 336 | wake_up_locked(&ctx->wqh); |
337 | wake_up_locked(&ctx->wqh); | ||
338 | } else | 337 | } else |
339 | ret = -ECANCELED; | 338 | ret = -ECANCELED; |
340 | spin_unlock_irq(&ctx->wqh.lock); | 339 | spin_unlock_irq(&ctx->wqh.lock); |