From 66ef27c3fd0e91038029054c862c9439be5137c1 Mon Sep 17 00:00:00 2001 From: Dave Young Date: Tue, 8 Nov 2011 13:44:59 +0800 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 Acked-by: Jiri Slaby Signed-off-by: Greg Kroah-Hartman --- drivers/tty/tty_ldisc.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/tty/tty_ldisc.c b/drivers/tty/tty_ldisc.c index 512c49f98e85..5201f78d39a6 100644 --- a/drivers/tty/tty_ldisc.c +++ b/drivers/tty/tty_ldisc.c @@ -556,8 +556,6 @@ static int tty_ldisc_wait_idle(struct tty_struct *tty) 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; } -- 2.39.2