projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
pty_write: don't do a tty_wakeup() when the buffers are full
[firefly-linux-kernel-4.4.55.git]
/
drivers
/
char
/
pty.c
diff --git
a/drivers/char/pty.c
b/drivers/char/pty.c
index b33d6688e9109a31bb27a6b297a73a8e69c5989d..53761cefa9154bb541d676b432550d61fc579efb 100644
(file)
--- a/
drivers/char/pty.c
+++ b/
drivers/char/pty.c
@@
-120,8
+120,10
@@
static int pty_write(struct tty_struct *tty, const unsigned char *buf, int c)
/* Stuff the data into the input queue of the other end */
c = tty_insert_flip_string(to, buf, c);
/* And shovel */
- tty_flip_buffer_push(to);
- tty_wakeup(tty);
+ if (c) {
+ tty_flip_buffer_push(to);
+ tty_wakeup(tty);
+ }
}
return c;
}