]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/char/pty.c
Merge branch 'linus' into x86/urgent
[mv-sheeva.git] / drivers / char / pty.c
index ad46eae1f9bb207847fd8ac2bf80b58d4f3922d8..923a48585501494f8b0bcae77aa562a1104bd7dd 100644 (file)
@@ -675,8 +675,10 @@ static int ptmx_open(struct inode *inode, struct file *filp)
        }
 
        set_bit(TTY_PTY_LOCK, &tty->flags); /* LOCK THE SLAVE */
-       filp->private_data = tty;
-       file_move(filp, &tty->tty_files);
+
+       retval = tty_add_file(tty, filp);
+       if (retval)
+               goto out;
 
        retval = devpts_pty_new(inode, tty->link);
        if (retval)