From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Carpenter Subject: [patch] timerfd: remove an always true check Date: Fri, 1 Aug 2014 11:28:48 +0300 Message-ID: <20140801082848.GF28869@mwanda> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Alexander Viro , linux-fsdevel@vger.kernel.org, kernel-janitors@vger.kernel.org To: Thomas Gleixner , Cyrill Gorcunov Return-path: Received: from userp1040.oracle.com ([156.151.31.81]:22594 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753830AbaHAI3h (ORCPT ); Fri, 1 Aug 2014 04:29:37 -0400 Content-Disposition: inline Sender: linux-fsdevel-owner@vger.kernel.org List-ID: We would have returned -EINVAL earlier if ticks wasn't set. Signed-off-by: Dan Carpenter diff --git a/fs/timerfd.c b/fs/timerfd.c index 80c3502..b46ffa9 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);