Signed-off-by: Martin Fuzzey <mfuzzey@xxxxxxxxx> --- drivers/serial/sc26xx.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/serial/sc26xx.c b/drivers/serial/sc26xx.c index 9b0ede0..33b21b9 100644 --- a/drivers/serial/sc26xx.c +++ b/drivers/serial/sc26xx.c @@ -301,7 +301,8 @@ static struct tty_struct *receive_chars(struct uart_port *port) if (status & port->ignore_status_mask) continue; - tty_insert_flip_char(tty, ch, flag); + if (tty) + tty_insert_flip_char(tty, ch, flag); } return tty; } -- To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html