From a86f50ed35a8854f964393e60526c16744e2ed2c Mon Sep 17 00:00:00 2001
From: Peter Hurley <peter@hurleysoftware.com>
Date: Sat, 9 Apr 2016 20:49:41 -0700
Subject: [PATCH] serial: 8250: Eliminate needless local in irq handlers
Git-commit: a86f50ed35a8854f964393e60526c16744e2ed2c
Patch-mainline: 4.7-rc1
References: bsc#1024449

dma_err is not used other than for boolean evaluation;
substitute the actual operation directly.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Takashi Iwai <tiwai@suse.de>

---
 drivers/tty/serial/8250/8250_omap.c |    8 ++------
 drivers/tty/serial/8250/8250_port.c |    6 +-----
 2 files changed, 3 insertions(+), 11 deletions(-)

--- a/drivers/tty/serial/8250/8250_omap.c
+++ b/drivers/tty/serial/8250/8250_omap.c
@@ -1036,7 +1036,6 @@ static int omap_8250_dma_handle_irq(stru
 	unsigned char status;
 	unsigned long flags;
 	u8 iir;
-	int dma_err = 0;
 
 	serial8250_rpm_get(up);
 
@@ -1051,9 +1050,7 @@ static int omap_8250_dma_handle_irq(stru
 	status = serial_port_in(port, UART_LSR);
 
 	if (status & (UART_LSR_DR | UART_LSR_BI)) {
-
-		dma_err = omap_8250_rx_dma(up, iir);
-		if (dma_err) {
+		if (omap_8250_rx_dma(up, iir)) {
 			status = serial8250_rx_chars(up, status);
 			omap_8250_rx_dma(up, 0);
 		}
@@ -1069,8 +1066,7 @@ static int omap_8250_dma_handle_irq(stru
 			 * try again due to an earlier failer which
 			 * might have been resolved by now.
 			 */
-			dma_err = omap_8250_tx_dma(up);
-			if (dma_err)
+			if (omap_8250_tx_dma(up))
 				serial8250_tx_chars(up);
 		}
 	}
--- a/drivers/tty/serial/8250/8250_port.c
+++ b/drivers/tty/serial/8250/8250_port.c
@@ -1805,7 +1805,6 @@ int serial8250_handle_irq(struct uart_po
 	unsigned char status;
 	unsigned long flags;
 	struct uart_8250_port *up = up_to_u8250p(port);
-	int dma_err = 0;
 
 	if (iir & UART_IIR_NO_INT)
 		return 0;
@@ -1817,10 +1816,7 @@ int serial8250_handle_irq(struct uart_po
 	DEBUG_INTR("status = %x...", status);
 
 	if (status & (UART_LSR_DR | UART_LSR_BI)) {
-		if (up->dma)
-			dma_err = up->dma->rx_dma(up, iir);
-
-		if (!up->dma || dma_err)
+		if (!up->dma || up->dma->rx_dma(up, iir))
 			status = serial8250_rx_chars(up, status);
 	}
 	serial8250_modem_status(up);
