serial: imx: simplify check that prevents starting PIO when DMA is in use
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Fri, 2 Mar 2018 10:07:22 +0000 (11:07 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 9 Mar 2018 18:21:01 +0000 (10:21 -0800)
commit0c54922384c14c1794c75af07c542752ab11787d
tree3397ba39b6eaf5bcfedef5237a9dea6cbe032c6f
parent686351f342fa745d10ddef08d0e930cf53b0c673
serial: imx: simplify check that prevents starting PIO when DMA is in use

The original code looks as follows:

if (sport->dma_is_enabled) {
... make sure TX DMA is running, i.e. .dma_is_txing = 1
}

if (sport->dma_is_txing)
return;

As .dma_is_txing can only be true if .dma_is_enabled is, the return can
go at the end of the first if body without an additional check.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/imx.c