diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c index 7710a6a77d971351cd053c2dc6dbb736383a2204..bf5a00145c0b01796adb5f318b7489828baa7209 100644 --- a/drivers/char/tty_io.c +++ b/drivers/char/tty_io.c @@ -933,13 +933,6 @@ static int tty_set_ldisc(struct tty_struct *tty, int ldisc) if (ld == NULL) return -EINVAL; - /* - * No more input please, we are switching. The new ldisc - * will update this value in the ldisc open function - */ - - tty->receive_room = 0; - /* * Problem: What do we do if this blocks ? */ @@ -951,6 +944,13 @@ static int tty_set_ldisc(struct tty_struct *tty, int ldisc) return 0; } + /* + * No more input please, we are switching. The new ldisc + * will update this value in the ldisc open function + */ + + tty->receive_room = 0; + o_ldisc = tty->ldisc; o_tty = tty->link;