Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 66ef27c3 authored by Dave Young's avatar Dave Young Committed by Greg Kroah-Hartman
Browse files

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: default avatarDave Young <dyoung@redhat.com>
Acked-by: default avatarJiri Slaby <jslaby@suse.cz>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 1ea6b8f4
Loading
Loading
Loading
Loading
+0 −2
Original line number Original line Diff line number Diff line
@@ -556,8 +556,6 @@ static int tty_ldisc_wait_idle(struct tty_struct *tty)
	int ret;
	int ret;
	ret = wait_event_timeout(tty_ldisc_idle,
	ret = wait_event_timeout(tty_ldisc_idle,
			atomic_read(&tty->ldisc->users) == 1, 5 * HZ);
			atomic_read(&tty->ldisc->users) == 1, 5 * HZ);
	if (ret < 0)
		return ret;
	return ret > 0 ? 0 : -EBUSY;
	return ret > 0 ? 0 : -EBUSY;
}
}