From: Dan Carpenter Date: Fri, 1 Aug 2014 08:28:48 +0000 (+0300) Subject: timerfd: Remove an always true check X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=88299c9bdb109e0d95abdca648065631ff91b2cb;p=openwrt%2Fstaging%2Fblogic.git timerfd: Remove an always true check We would have returned -EINVAL earlier if ticks wasn't set. Signed-off-by: Dan Carpenter Cc: Alexander Viro Cc: Cyrill Gorcunov Link: http://lkml.kernel.org/r/20140801082848.GF28869@mwanda Signed-off-by: Thomas Gleixner --- 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 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);