From: Roel Kluin Date: Fri, 11 Oct 2013 20:08:49 +0000 (+0200) Subject: tty: incorrect test of echo_buf() result for ECHO_OP_START X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=c476f6584b0011741b4f0316f1ac4aa3a99403e1;p=linux-beck.git tty: incorrect test of echo_buf() result for ECHO_OP_START test echo_buf() result for ECHO_OP_START Signed-off-by: Roel Kluin Acked-by: Peter Hurley Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c index 4e69f3bd7fd8..7cdd1eb9406c 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