mxser: remove else from LSR bits checks
authorJiri Slaby <jslaby@suse.cz>
Fri, 18 Jun 2021 06:14:23 +0000 (08:14 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 18 Jun 2021 11:09:59 +0000 (13:09 +0200)
UART_LSR_SPECIAL is composed of UART_LSR_BI, UART_LSR_PE, UART_LSR_FE,
UART_LSR_OE. So status cannot be anything else. Remove the unused else
branch.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Link: https://lore.kernel.org/r/20210618061516.662-18-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/mxser.c

index 6b8f2b0e0726345e5fd7a9706cf1686413c3fe7e..1b8032c9351e542dd3d655ea64b589092cd59c82 100644 (file)
@@ -2124,8 +2124,7 @@ static u8 mxser_receive_chars_old(struct tty_struct *tty,
                                } else if (status & UART_LSR_OE) {
                                        flag = TTY_OVERRUN;
                                        port->icount.overrun++;
-                               } else
-                                       flag = TTY_BREAK;
+                               }
                        }
                        tty_insert_flip_char(&port->port, ch, flag);
                        (*cnt)++;