summaryrefslogtreecommitdiff
path: root/drivers/tty
diff options
context:
space:
mode:
authorRoel Kluin <roel.kluin@gmail.com>2013-10-11 20:08:49 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-10-16 20:12:13 (GMT)
commitc476f6584b0011741b4f0316f1ac4aa3a99403e1 (patch)
tree4c99ba7169ff3f4069b7378f090427a60b43fca1 /drivers/tty
parentfc811472c2167cc885b7af422b074cc9224f3a93 (diff)
downloadlinux-c476f6584b0011741b4f0316f1ac4aa3a99403e1.tar.xz
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')
-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 4e69f3b..7cdd1eb 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