summaryrefslogtreecommitdiff
path: root/drivers/tty
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2021-04-26 13:55:14 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-05-13 18:07:43 +0300
commit3ddb4ce1e6e3bd112778ab93bbd9092f23a878ec (patch)
tree4487aeb5ed70f803ff013580e0091b96a61797d2 /drivers/tty
parent6efb943b8616ec53a5e444193dccf1af9ad627b5 (diff)
downloadlinux-3ddb4ce1e6e3bd112778ab93bbd9092f23a878ec.tar.xz
serial: tegra: Fix a mask operation that is always true
Currently the expression lsr | UART_LSR_TEMT is always true and this seems suspect. I believe the intent was to mask lsr with UART_LSR_TEMT to check that bit, so the expression should be using the & operator instead. Fix this. Fixes: b9c2470fb150 ("serial: tegra: flush the RX fifo on frame error") Signed-off-by: Colin Ian King <colin.king@canonical.com> Cc: stable <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20210426105514.23268-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/serial-tegra.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/serial/serial-tegra.c b/drivers/tty/serial/serial-tegra.c
index bbae072a125d..222032792d6c 100644
--- a/drivers/tty/serial/serial-tegra.c
+++ b/drivers/tty/serial/serial-tegra.c
@@ -338,7 +338,7 @@ static void tegra_uart_fifo_reset(struct tegra_uart_port *tup, u8 fcr_bits)
do {
lsr = tegra_uart_read(tup, UART_LSR);
- if ((lsr | UART_LSR_TEMT) && !(lsr & UART_LSR_DR))
+ if ((lsr & UART_LSR_TEMT) && !(lsr & UART_LSR_DR))
break;
udelay(1);
} while (--tmout);