Skip to content

Commit 3ddb4ce

Browse files
Colin Ian Kinggregkh
authored andcommitted
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: b9c2470 ("serial: tegra: flush the RX fifo on frame error") Signed-off-by: Colin Ian King <[email protected]> Cc: stable <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 6efb943 commit 3ddb4ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/tty/serial/serial-tegra.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ static void tegra_uart_fifo_reset(struct tegra_uart_port *tup, u8 fcr_bits)
338338

339339
do {
340340
lsr = tegra_uart_read(tup, UART_LSR);
341-
if ((lsr | UART_LSR_TEMT) && !(lsr & UART_LSR_DR))
341+
if ((lsr & UART_LSR_TEMT) && !(lsr & UART_LSR_DR))
342342
break;
343343
udelay(1);
344344
} while (--tmout);

0 commit comments

Comments
 (0)