summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@quicinc.com>2017-09-09 06:32:42 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2017-09-09 06:32:42 -0700
commit6cdb81fdcfc0c06f88e70a6598c8579b78dba4c3 (patch)
tree0f957fba5d3b169bc379c2056d5b8c04e9bdb137
parentc85421c41a116c46fda655e5090f08dcb056aab5 (diff)
parentb8f1ab847c744e09817831f84d3b323ccccc7167 (diff)
Merge "tty: serial_core: add tty NULL check to uart_tx_stopped"
-rw-r--r--include/linux/serial_core.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index b2c1ea2a4739..f276869a945e 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -402,7 +402,7 @@ int uart_resume_port(struct uart_driver *reg, struct uart_port *port);
static inline int uart_tx_stopped(struct uart_port *port)
{
struct tty_struct *tty = port->state->port.tty;
- if (tty->stopped || port->hw_stopped)
+ if ((tty && tty->stopped) || port->hw_stopped)
return 1;
return 0;
}