Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial
[powerpc.git] / drivers / char / tty_io.c
index f6ac1d3..fc662e4 100644 (file)
@@ -933,13 +933,6 @@ restart:
        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 @@ restart:
                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;