From 0287228d813fd2fdaadc9995f42d991280ee05f6 Mon Sep 17 00:00:00 2001 From: "roshni.shah" Date: Thu, 18 Jul 2013 13:00:46 -0400 Subject: Fixed the uart_tasklet_action NULL pointer deference panic in MVF Serial Driver --- drivers/tty/serial/mvf.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/drivers/tty/serial/mvf.c b/drivers/tty/serial/mvf.c index 037d09e386dc..bbb08a0f3613 100644 --- a/drivers/tty/serial/mvf.c +++ b/drivers/tty/serial/mvf.c @@ -207,7 +207,12 @@ static inline void imx_transmit_buffer(struct imx_port *sport) } if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) + { + if (sport->port.state->port.tty) + { uart_write_wakeup(&sport->port); + } + } if (uart_circ_empty(xmit)) imx_stop_tx(&sport->port); @@ -296,7 +301,12 @@ static void dma_tx_work(struct work_struct *w) spin_unlock_irqrestore(&sport->port.lock, flags); if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) + { + if (sport->port.state->port.tty) + { uart_write_wakeup(&sport->port); + } + } return; } @@ -346,7 +356,12 @@ static irqreturn_t imx_txint(int irq, void *dev_id) imx_transmit_buffer(sport); if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) + { + if (sport->port.state->port.tty) + { uart_write_wakeup(&sport->port); + } + } out: spin_unlock_irqrestore(&sport->port.lock, flags); -- cgit v1.2.3