lkml.org 
[lkml]   [2011]   [Nov]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] tty_ldisc: remove unnecessary negative return check for wait_event_timeout
wait_event_timeout always return value >= 0
remove the unnecessary ret < 0 check

Signed-off-by: Dave Young <dyoung@redhat.com>
---
drivers/tty/tty_ldisc.c | 2 --
1 file changed, 2 deletions(-)

--- linux-2.6.orig/drivers/tty/tty_ldisc.c 2011-11-01 13:06:20.000000000 +0800
+++ linux-2.6/drivers/tty/tty_ldisc.c 2011-11-08 13:31:30.596308060 +0800
@@ -556,8 +556,6 @@ static int tty_ldisc_wait_idle(struct tt
int ret;
ret = wait_event_timeout(tty_ldisc_idle,
atomic_read(&tty->ldisc->users) == 1, 5 * HZ);
- if (ret < 0)
- return ret;
return ret > 0 ? 0 : -EBUSY;
}


\
 
 \ /
  Last update: 2011-11-08 06:45    [W:0.038 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site