timerfd: remove an always true check
Subsystems (3)
PATCH 1/1 timerfd: remove an always true check
We would have returned -EINVAL earlier if ticks wasn't set.
Signed-off-by Dan Carpenter <[email protected]>
fs/timerfd.c +1 -2
@@ -333,8 +333,7 @@ static long timerfd_ioctl(struct file *file, unsigned int cmd, unsigned long argspin_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);
Quoted 3 lines · Dan Carpenter
We would have returned
-EINVALearlier if ticks wasn't set.Signed-off-by Dan Carpenter <[email protected]>
Acked-by Cyrill Gorcunov <[email protected]>
Yeah, thanks a lot, Dan!
tip-bot for Dan Carpenter
merge bot[tip:timers/core] timerfd: Remove an always true check
In reply to Dan Carpentertimerfd: Remove an always true check
Commit-ID: 88299c9bdb109e0d95abdca648065631ff91b2cb Gitweb: http://git.kernel.org/tip/88299c9bdb109e0d95abdca648065631ff91b2cb Author: Dan Carpenter <[email protected]> AuthorDate: Fri, 1 Aug 2014 11:28:48 +0300 Committer: Thomas Gleixner <[email protected]> CommitDate: Wed, 27 Aug 2014 11:17:48 +0200
timerfd: Remove an always true check
We would have returned -EINVAL earlier if ticks wasn't set.
Signed-off-by Dan Carpenter <[email protected]>
Cc Alexander Viro <[email protected]>
Cc Cyrill Gorcunov <[email protected]>
Signed-off-by Thomas Gleixner <[email protected]>
--- fs/timerfd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
fs/timerfd.c +1 -2
@@ -333,8 +333,7 @@ static long timerfd_ioctl(struct file *file, unsigned int cmd, unsigned long argspin_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);