diff options
Diffstat (limited to 'drivers/tty/pty.c')
-rw-r--r-- | drivers/tty/pty.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/tty/pty.c b/drivers/tty/pty.c index d8653ab6f498..03147fa31d47 100644 --- a/drivers/tty/pty.c +++ b/drivers/tty/pty.c | |||
@@ -515,10 +515,8 @@ static int pty_unix98_ioctl(struct tty_struct *tty, | |||
515 | static struct tty_struct *ptm_unix98_lookup(struct tty_driver *driver, | 515 | static struct tty_struct *ptm_unix98_lookup(struct tty_driver *driver, |
516 | struct inode *ptm_inode, int idx) | 516 | struct inode *ptm_inode, int idx) |
517 | { | 517 | { |
518 | struct tty_struct *tty = devpts_get_tty(ptm_inode, idx); | 518 | /* Master must be open via /dev/ptmx */ |
519 | if (tty) | 519 | return ERR_PTR(-EIO); |
520 | tty = tty->link; | ||
521 | return tty; | ||
522 | } | 520 | } |
523 | 521 | ||
524 | /** | 522 | /** |
@@ -677,7 +675,7 @@ static int ptmx_open(struct inode *inode, struct file *filp) | |||
677 | 675 | ||
678 | mutex_lock(&tty_mutex); | 676 | mutex_lock(&tty_mutex); |
679 | tty_lock(); | 677 | tty_lock(); |
680 | tty = tty_init_dev(ptm_driver, index, 1); | 678 | tty = tty_init_dev(ptm_driver, index); |
681 | mutex_unlock(&tty_mutex); | 679 | mutex_unlock(&tty_mutex); |
682 | 680 | ||
683 | if (IS_ERR(tty)) { | 681 | if (IS_ERR(tty)) { |