serial: tegra: Fix a mask operation that is always true
authorColin Ian King <colin.king@canonical.com>
Mon, 26 Apr 2021 10:55:14 +0000 (11:55 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 May 2021 15:07:43 +0000 (17:07 +0200)
commit3ddb4ce1e6e3bd112778ab93bbd9092f23a878ec
tree4487aeb5ed70f803ff013580e0091b96a61797d2
parent6efb943b8616ec53a5e444193dccf1af9ad627b5
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>
drivers/tty/serial/serial-tegra.c