timerfd: Remove an always true check
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 1 Aug 2014 08:28:48 +0000 (11:28 +0300)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 27 Aug 2014 09:17:48 +0000 (11:17 +0200)
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>
fs/timerfd.c

index 80c350216ea8e159f2a22837efeb33c38b87a260..b46ffa94372a58b600660a106a2a92545252f5f1 100644 (file)
@@ -333,8 +333,7 @@ static long timerfd_ioctl(struct file *file, unsigned int cmd, unsigned long arg
                spin_lock_irq(&ctx->wqh.lock);
                if (!timerfd_canceled(ctx)) {
                        ctx->ticks = ticks;
-                       if (ticks)
-                               wake_up_locked(&ctx->wqh);
+                       wake_up_locked(&ctx->wqh);
                } else
                        ret = -ECANCELED;
                spin_unlock_irq(&ctx->wqh.lock);