From d2967703c47bdcc9fa58b9895d7dcab1c31f74ec Mon Sep 17 00:00:00 2001 From: Huang Shijie Date: Mon, 5 Dec 2011 18:53:47 +0800 Subject: [PATCH] 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 --- drivers/tty/serial/imx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); } /* -- 2.39.5