From: Huang Shijie Date: Mon, 5 Dec 2011 10:53:47 +0000 (+0800) Subject: ENGR00169433 IMX/UART : fix a bug in UART RX X-Git-Tag: v3.0.35-fsl_4.1.0~1975 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=d2967703c47bdcc9fa58b9895d7dcab1c31f74ec;p=karo-tx-linux.git ENGR00169433 IMX/UART : fix a bug in UART RX The origin code did not check the running situation. It will cause a NULL pointer issue. This patch fixes it. Signed-off-by: Huang Shijie --- diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index b9e169417c7b..f31fa1e16ca7 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c @@ -741,7 +741,9 @@ static void dma_rx_work(struct work_struct *w) tty_flip_buffer_push(tty); sport->rx_bytes = 0; } - start_rx_dma(sport); + + if (sport->dma_is_rxing) + start_rx_dma(sport); } /*