提交 66ef27c3 编写于 作者: D Dave Young 提交者: Greg Kroah-Hartman

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: NDave Young <dyoung@redhat.com>
Acked-by: NJiri Slaby <jslaby@suse.cz>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 1ea6b8f4
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册