diff options
-rw-r--r-- | drivers/tty/tty_ldisc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/tty/tty_ldisc.c b/drivers/tty/tty_ldisc.c index d8e96b005023..4214d58276f7 100644 --- a/drivers/tty/tty_ldisc.c +++ b/drivers/tty/tty_ldisc.c | |||
@@ -454,6 +454,8 @@ static int tty_ldisc_open(struct tty_struct *tty, struct tty_ldisc *ld) | |||
454 | /* BTM here locks versus a hangup event */ | 454 | /* BTM here locks versus a hangup event */ |
455 | WARN_ON(!tty_locked()); | 455 | WARN_ON(!tty_locked()); |
456 | ret = ld->ops->open(tty); | 456 | ret = ld->ops->open(tty); |
457 | if (ret) | ||
458 | clear_bit(TTY_LDISC_OPEN, &tty->flags); | ||
457 | return ret; | 459 | return ret; |
458 | } | 460 | } |
459 | return 0; | 461 | return 0; |