aboutsummaryrefslogtreecommitdiff
path: root/drivers/tty/n_tty.c
diff options
context:
space:
mode:
authorRoel Kluin <roel.kluin@gmail.com>2013-10-11 22:08:49 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-10-16 13:12:13 -0700
commitc476f6584b0011741b4f0316f1ac4aa3a99403e1 (patch)
tree4c99ba7169ff3f4069b7378f090427a60b43fca1 /drivers/tty/n_tty.c
parentfc811472c2167cc885b7af422b074cc9224f3a93 (diff)
tty: incorrect test of echo_buf() result for ECHO_OP_START
test echo_buf() result for ECHO_OP_START Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Acked-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/n_tty.c')
-rw-r--r--drivers/tty/n_tty.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c
index 4e69f3bd7fd..7cdd1eb9406 100644
--- a/drivers/tty/n_tty.c
+++ b/drivers/tty/n_tty.c
@@ -767,7 +767,7 @@ static size_t __process_echoes(struct tty_struct *tty)
* of echo overrun before the next commit), then discard enough
* data at the tail to prevent a subsequent overrun */
while (ldata->echo_commit - tail >= ECHO_DISCARD_WATERMARK) {
- if (echo_buf(ldata, tail == ECHO_OP_START)) {
+ if (echo_buf(ldata, tail) == ECHO_OP_START) {
if (echo_buf(ldata, tail) == ECHO_OP_ERASE_TAB)
tail += 3;
else