[RFC][PATCH 1/7]: Propagate error code from devpts_pty_new

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <linux-kernel@...>
Cc: Containers <containers@...>, <clg@...>, Pavel Emelyanov <xemul@...>
Date: Tuesday, April 8, 2008 - 5:58 pm

From: Sukadev Bhattiprolu <sukadev@us.ibm.com>
Subject: [RFC][PATCH 1/7]: 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-mm1/drivers/char/tty_io.c
===================================================================
--- 2.6.25-rc8-mm1.orig/drivers/char/tty_io.c	2008-04-07 14:49:56.000000000 -0700
+++ 2.6.25-rc8-mm1/drivers/char/tty_io.c	2008-04-08 09:12:55.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");
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC][PATCH 0/7] Clone PTS namespace, , (Tue Apr 8, 5:53 pm)
Re: [RFC][PATCH 0/7] Clone PTS namespace, H. Peter Anvin, (Tue Apr 8, 8:53 pm)
Re: [RFC][PATCH 0/7] Clone PTS namespace, Eric W. Biederman, (Wed Apr 9, 6:15 pm)
Re: [RFC][PATCH 0/7] Clone PTS namespace, Serge E. Hallyn, (Wed Apr 9, 9:59 pm)
Re: [RFC][PATCH 0/7] Clone PTS namespace, Eric W. Biederman, (Thu Apr 10, 3:36 am)
Re: [RFC][PATCH 0/7] Clone PTS namespace, Serge E. Hallyn, (Tue Apr 22, 10:25 am)
Re: [RFC][PATCH 0/7] Clone PTS namespace, Eric W. Biederman, (Tue Apr 22, 2:53 pm)
Re: [RFC][PATCH 0/7] Clone PTS namespace, Serge E. Hallyn, (Wed Apr 23, 10:36 am)
Re: [RFC][PATCH 0/7] Clone PTS namespace, Serge E. Hallyn, (Wed Apr 23, 1:57 pm)
Re: [RFC][PATCH 0/7] Clone PTS namespace, Eric W. Biederman, (Wed Apr 23, 2:49 pm)
Re: [RFC][PATCH 0/7] Clone PTS namespace, Serge E. Hallyn, (Fri Apr 25, 3:21 pm)
Re: [RFC][PATCH 0/7] Clone PTS namespace, Eric W. Biederman, (Fri Apr 25, 3:47 pm)
Re: [RFC][PATCH 0/7] Clone PTS namespace, Serge E. Hallyn, (Sat Apr 26, 9:02 am)
Re: [RFC][PATCH 0/7] Clone PTS namespace, Serge E. Hallyn, (Thu Apr 10, 12:44 pm)
Re: [RFC][PATCH 0/7] Clone PTS namespace, H. Peter Anvin, (Wed Apr 9, 2:01 pm)
Re: [RFC][PATCH 0/7] Clone PTS namespace, H. Peter Anvin, (Wed Apr 9, 6:38 pm)
[RFC][PATCH 1/7]: Propagate error code from devpts_pty_new, , (Tue Apr 8, 5:58 pm)