serial: 8250: Clear dma tx_err unconditionally
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Fri, 19 Aug 2022 11:00:02 +0000 (14:00 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 30 Aug 2022 12:15:20 +0000 (14:15 +0200)
No need to check non-zeroness first and then clear. Just set to zero
unconditionally.

Acked-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/3b885e7f-1372-3aa9-febd-34566ba25e3d@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/8250/8250_dma.c

index a8dba4a0a8fb70b823abd89cbeed677f84079429..d99020fd3427382342ce83c83b03db6be8a09bb5 100644 (file)
@@ -107,8 +107,7 @@ int serial8250_tx_dma(struct uart_8250_port *p)
 
        dma_async_issue_pending(dma->txchan);
        serial8250_clear_THRI(p);
-       if (dma->tx_err)
-               dma->tx_err = 0;
+       dma->tx_err = 0;
 
        return 0;
 err: