diff options
author | Pekka Enberg <penberg@kernel.org> | 2010-08-24 04:48:34 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-10-22 17:19:58 (GMT) |
commit | f573bd1764f0f3f47754ca1ae7b2eb2909798a60 (patch) | |
tree | bfc4c03b38bc74bb29dbacce212fe2efc802eb46 /drivers/char/pty.c | |
parent | 8a28af7f7e42cd0f107e0d84e4ece89e7ef24d3f (diff) | |
download | linux-f573bd1764f0f3f47754ca1ae7b2eb2909798a60.tar.xz |
tty: Remove __GFP_NOFAIL from tty_add_file()
This patch removes __GFP_NOFAIL use from tty_add_file() and adds proper error
handling to the call-sites of the function.
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
Acked-by: David Rientjes <rientjes@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/char/pty.c')
-rw-r--r-- | drivers/char/pty.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/char/pty.c b/drivers/char/pty.c index c350d01..923a485 100644 --- a/drivers/char/pty.c +++ b/drivers/char/pty.c @@ -676,7 +676,9 @@ static int ptmx_open(struct inode *inode, struct file *filp) set_bit(TTY_PTY_LOCK, &tty->flags); /* LOCK THE SLAVE */ - tty_add_file(tty, filp); + retval = tty_add_file(tty, filp); + if (retval) + goto out; retval = devpts_pty_new(inode, tty->link); if (retval) |