serial: sprd: correct the wrong sequence of arguments
authorChunyan Zhang <chunyan.zhang@unisoc.com>
Thu, 5 Sep 2019 07:41:51 +0000 (15:41 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Sep 2019 07:57:44 +0000 (09:57 +0200)
The sequence of arguments which was passed to handle_lsr_errors() didn't
match the parameters defined in that function, &lsr was passed to flag
and &flag was passed to lsr, this patch fixed that.

Fixes: b7396a38fb28 ("tty/serial: Add Spreadtrum sc9836-uart driver support")
Signed-off-by: Chunyan Zhang <chunyan.zhang@unisoc.com>
Signed-off-by: Chunyan Zhang <zhang.lyra@gmail.com>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20190905074151.5268-1-zhang.lyra@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/sprd_serial.c

index f8db5c8e4e39cc36b6e490eca85dc7eed1411df0..771d1119652315f7d60707d2de4f7160ff9275d1 100644 (file)
@@ -617,7 +617,7 @@ static inline void sprd_rx(struct uart_port *port)
 
                if (lsr & (SPRD_LSR_BI | SPRD_LSR_PE |
                           SPRD_LSR_FE | SPRD_LSR_OE))
-                       if (handle_lsr_errors(port, &lsr, &flag))
+                       if (handle_lsr_errors(port, &flag, &lsr))
                                continue;
                if (uart_handle_sysrq_char(port, ch))
                        continue;