From: sukadev@us.ibm.com
To: Andrew Morton <akpm@osdl.org>
Cc: serue@us.ibm.com, "Eric W. Biederman" <ebiederm@xmission.com>,
hpa@zytor.com, Containers <containers@lists.osdl.org>,
linux-kernel@vger.kernel.org
Subject: [PATCH]: Propagate error code from devpts_pty_new
Date: Wed, 16 Apr 2008 15:15:24 -0700 [thread overview]
Message-ID: <20080416221524.GA7112@us.ibm.com> (raw)
From: Sukadev Bhattiprolu <sukadev@us.ibm.com>
Subject: [PATCH]: 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>
---
drivers/char/tty_io.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Index: 2.6.25-rc8-mm2/drivers/char/tty_io.c
===================================================================
--- 2.6.25-rc8-mm2.orig/drivers/char/tty_io.c 2008-04-16 09:38:23.000000000 -0700
+++ 2.6.25-rc8-mm2/drivers/char/tty_io.c 2008-04-16 09:51:11.000000000 -0700
@@ -2835,8 +2835,8 @@ static int ptmx_open(struct inode *inode
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, "tty_open");
next reply other threads:[~2008-04-16 22:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-16 22:15 sukadev [this message]
[not found] ` <20080416221524.GA7112-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-04-17 15:37 ` [PATCH]: Propagate error code from devpts_pty_new Serge E. Hallyn
[not found] ` <20080417153748.GB14215-6s5zFf/epYLPQpwDFJZrxKsjOiXwFzmk@public.gmane.org>
2008-04-17 16:05 ` H. Peter Anvin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080416221524.GA7112@us.ibm.com \
--to=sukadev@us.ibm.com \
--cc=akpm@osdl.org \
--cc=containers@lists.osdl.org \
--cc=ebiederm@xmission.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=serue@us.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox