diff options
author | roshni.shah <roshni.shah@timesys.com> | 2013-07-18 13:00:46 -0400 |
---|---|---|
committer | Anthony Felice <tony.felice@timesys.com> | 2014-02-25 16:28:14 -0500 |
commit | e6219d5852d2e6f49009ea40f143bc084bb6e8fd (patch) | |
tree | 32e207034460d5e2a2498c782c0c35ae53f6844b /drivers/tty | |
parent | 8ddb81e109c38fc890068f3a82b826a2db51644b (diff) |
Fixed the uart_tasklet_action NULL pointer deference panic in MVF Serial Driver
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/mvf.c | 15 |
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); |