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; }