summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroshni.shah <roshni.shah@timesys.com>2013-07-18 13:00:46 -0400
committerroshni.shah <roshni.shah@timesys.com>2014-01-04 19:33:22 -0500
commit2d358ad6703611c8dc0d2a5c6fe547751a603e84 (patch)
treea96985b7845f7e5d6f258e4ed726e9714d2adb8f
parentdbb7aa8c2bcccecbdd9be551e68207d1729d1bf4 (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);