serial: 8250: Reduce expr in 8250 irq handler

If !up->dma == F, then up->dma == T and can be elided from the
(up->dma && up->dma->tx_err) sub-expression.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Peter Hurley 2016-04-09 20:49:42 -07:00 committed by Greg Kroah-Hartman
parent a86f50ed35
commit d601744dc1
1 changed files with 1 additions and 2 deletions

View File

@ -1811,8 +1811,7 @@ int serial8250_handle_irq(struct uart_port *port, unsigned int iir)
status = serial8250_rx_chars(up, status); status = serial8250_rx_chars(up, status);
} }
serial8250_modem_status(up); serial8250_modem_status(up);
if ((!up->dma || (up->dma && up->dma->tx_err)) && if ((!up->dma || up->dma->tx_err) && (status & UART_LSR_THRE))
(status & UART_LSR_THRE))
serial8250_tx_chars(up); serial8250_tx_chars(up);
spin_unlock_irqrestore(&port->lock, flags); spin_unlock_irqrestore(&port->lock, flags);