Skip to content

Commit

Permalink
tty_ldisc: remove unnecessary negative return check for wait_event_ti…
Browse files Browse the repository at this point in the history
…meout

wait_event_timeout always return value >= 0
remove the unnecessary ret < 0 check

Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Dave Young authored and Greg Kroah-Hartman committed Nov 15, 2011
1 parent 1ea6b8f commit 66ef27c
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/tty/tty_ldisc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 66ef27c

Please sign in to comment.