diff options
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/pty.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/tty/pty.c b/drivers/tty/pty.c index 696e8510a5f..e18604b3fc7 100644 --- a/drivers/tty/pty.c +++ b/drivers/tty/pty.c @@ -699,15 +699,15 @@ static int ptmx_open(struct inode *inode, struct file *filp) retval = devpts_pty_new(inode, tty->link); if (retval) - goto out1; + goto err_release; retval = ptm_driver->ops->open(tty, filp); if (retval) - goto out2; -out1: + goto err_release; + tty_unlock(); - return retval; -out2: + return 0; +err_release: tty_unlock(); tty_release(inode, filp); return retval; |