summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroshni.shah <roshni.shah@timesys.com>2013-07-18 13:00:46 -0400
committerAnthony Felice <tony.felice@timesys.com>2014-02-25 16:22:29 -0500
commita49fd1024d1b733a00f47439ea35c798c70097a5 (patch)
tree8d57e5ae649f0160ff17f0b2e8d2e6ca4ee623f1
parente2ba11a319a94f05395c5ec42d6cdde2401c3bee (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 6cff806450e2..814a7daa56f0 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);