diff --git a/drivers/tty/tty_port.c b/drivers/tty/tty_port.c index 7557bcd84b27..189c2fa09c6d 100644 --- a/drivers/tty/tty_port.c +++ b/drivers/tty/tty_port.c @@ -688,6 +688,7 @@ int tty_port_open(struct tty_port *port, struct tty_struct *tty, clear_bit(TTY_IO_ERROR, &tty->flags); if (port->ops->activate) { int retval = port->ops->activate(port, tty); + if (retval) { mutex_unlock(&port->mutex); return retval;