aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/n_tty.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2019-07-20 07:07:56 +0300
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2019-07-20 07:07:56 +0300
commitc39f2d9db0fd81ea20bb5cce9b3f082ca63753e2 (patch)
tree8e80ed5601b4fb8880a2ca8e08802bc8b1f850bd /drivers/tty/n_tty.c
parentMerge branch 'next' into for-linus (diff)
parentInput: alps - fix a mismatch between a condition check and its comment (diff)
downloadlinux-dev-c39f2d9db0fd81ea20bb5cce9b3f082ca63753e2.tar.xz
linux-dev-c39f2d9db0fd81ea20bb5cce9b3f082ca63753e2.zip
Merge branch 'next' into for-linus
Prepare second round of input updates for 5.3 merge window.
Diffstat (limited to 'drivers/tty/n_tty.c')
-rw-r--r--drivers/tty/n_tty.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c
index 9cdb0fa3c4bf..f9c584244f72 100644
--- a/drivers/tty/n_tty.c
+++ b/drivers/tty/n_tty.c
@@ -550,9 +550,9 @@ static ssize_t process_output_block(struct tty_struct *tty,
mutex_lock(&ldata->output_lock);
space = tty_write_room(tty);
- if (!space) {
+ if (space <= 0) {
mutex_unlock(&ldata->output_lock);
- return 0;
+ return space;
}
if (nr > space)
nr = space;