diff options
author | Sukadev Bhattiprolu <sukadev@us.ibm.com> | 2008-04-30 11:54:20 +0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-30 19:29:48 +0400 |
commit | 4f8f9d66cdac4845409f7520e4f287a1907a6bf9 (patch) | |
tree | 5b70fe024acd91a64e1c6b8848637e753cdb9b1a /drivers | |
parent | 86a96538178f923aa1aa43c1e7cfec5951df7f8a (diff) | |
download | linux-4f8f9d66cdac4845409f7520e4f287a1907a6bf9.tar.xz |
devpts: propagate error code from devpts_pty_new
Have ptmx_open() propagate any error code returned by devpts_pty_new()
(which returns either 0 or -ENOMEM anyway).
Signed-off-by: Sukadev Bhattiprolu <sukadev@us.ibm.com>
Acked-by: Serge Hallyn <serue@us.ibm.com>
Acked-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/char/tty_io.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c index ddfa529936e8..edcb7e471f02 100644 --- a/drivers/char/tty_io.c +++ b/drivers/char/tty_io.c @@ -2838,8 +2838,8 @@ static int ptmx_open(struct inode *inode, struct file *filp) filp->private_data = tty; file_move(filp, &tty->tty_files); - retval = -ENOMEM; - if (devpts_pty_new(tty->link)) + retval = devpts_pty_new(tty->link); + if (retval) goto out1; check_tty_count(tty, "ptmx_open"); |