Merge branch 'master' into next
[sfrench/cifs-2.6.git] / drivers / char / pty.c
index b33d6688e9109a31bb27a6b297a73a8e69c5989d..53761cefa9154bb541d676b432550d61fc579efb 100644 (file)
@@ -120,8 +120,10 @@ static int pty_write(struct tty_struct *tty, const unsigned char *buf, int c)
                /* Stuff the data into the input queue of the other end */
                c = tty_insert_flip_string(to, buf, c);
                /* And shovel */
-               tty_flip_buffer_push(to);
-               tty_wakeup(tty);
+               if (c) {
+                       tty_flip_buffer_push(to);
+                       tty_wakeup(tty);
+               }
        }
        return c;
 }