aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/tty/tty_ioctl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/tty/tty_ioctl.c b/drivers/tty/tty_ioctl.c
index 89ae23ac9ae6..632fc8152061 100644
--- a/drivers/tty/tty_ioctl.c
+++ b/drivers/tty/tty_ioctl.c
@@ -218,10 +218,10 @@ void tty_wait_until_sent(struct tty_struct *tty, long timeout)
218 if (!timeout) 218 if (!timeout)
219 timeout = MAX_SCHEDULE_TIMEOUT; 219 timeout = MAX_SCHEDULE_TIMEOUT;
220 220
221 if (wait_event_interruptible_timeout(tty->write_wait, 221 timeout = wait_event_interruptible_timeout(tty->write_wait,
222 !tty_chars_in_buffer(tty), timeout) < 0) { 222 !tty_chars_in_buffer(tty), timeout);
223 if (timeout <= 0)
223 return; 224 return;
224 }
225 225
226 if (timeout == MAX_SCHEDULE_TIMEOUT) 226 if (timeout == MAX_SCHEDULE_TIMEOUT)
227 timeout = 0; 227 timeout = 0;