|
@@ -686,15 +686,15 @@ static int ptmx_open(struct inode *inode, struct file *filp)
|
|
|
|
|
|
retval = devpts_pty_new(inode, tty->link);
|
|
retval = devpts_pty_new(inode, tty->link);
|
|
if (retval)
|
|
if (retval)
|
|
- goto out1;
|
|
|
|
|
|
+ goto err_release;
|
|
|
|
|
|
retval = ptm_driver->ops->open(tty, filp);
|
|
retval = ptm_driver->ops->open(tty, filp);
|
|
if (retval)
|
|
if (retval)
|
|
- goto out2;
|
|
|
|
-out1:
|
|
|
|
|
|
+ goto err_release;
|
|
|
|
+
|
|
tty_unlock();
|
|
tty_unlock();
|
|
- return retval;
|
|
|
|
-out2:
|
|
|
|
|
|
+ return 0;
|
|
|
|
+err_release:
|
|
tty_unlock();
|
|
tty_unlock();
|
|
tty_release(inode, filp);
|
|
tty_release(inode, filp);
|
|
return retval;
|
|
return retval;
|