public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tty_ldisc: remove unnecessary negative return check for wait_event_timeout
@ 2011-11-08  5:44 Dave Young
  2011-11-08  8:27 ` Jiri Slaby
  0 siblings, 1 reply; 2+ messages in thread
From: Dave Young @ 2011-11-08  5:44 UTC (permalink / raw)
  To: gregkh, linux-kernel

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;
 }
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-11-08  8:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-08  5:44 [PATCH] tty_ldisc: remove unnecessary negative return check for wait_event_timeout Dave Young
2011-11-08  8:27 ` Jiri Slaby

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox