summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroshni.shah <roshni.shah@timesys.com>2013-07-18 13:00:46 -0400
committerAndy Voltz <andy.voltz@timesys.com>2013-07-26 01:30:24 -0400
commit0287228d813fd2fdaadc9995f42d991280ee05f6 (patch)
treea96985b7845f7e5d6f258e4ed726e9714d2adb8f
parent6619f8df2dfe43d84587823a68b9e1c53233af71 (diff)
Fixed the uart_tasklet_action NULL pointer deference panic in MVF Serial Driver
-rw-r--r--drivers/tty/serial/mvf.c15
1 files changed, 15 insertions, 0 deletions
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);