: Propagate error code from devpts_pty_new
PATCH 1/1 : Propagate error code from devpts_pty_new
From: Sukadev Bhattiprolu <[email protected]>
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).
--- drivers/char/tty_io.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/char/tty_io.c +2 -2
@@ -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" );
Quoted 7 lines · Quoting sukadev-r/[email protected]…
From: Sukadev Bhattiprolu <sukadev-r/[email protected]>
Subject: [PATCH]: Propagate error code fromdevpts_pty_newHave
ptmx_open()propagate any error code returned bydevpts_pty_new()(which returns either 0 or-ENOMEManyway).Signed-off-by Sukadev Bhattiprolu <sukadev-r/[email protected]>
Seems nice and non-contentuous.
thanks,
-serge
Quoted 19 lines
--- drivers/char/tty_io.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)Index:
2.6.25-rc8-mm2/drivers/char/tty_io.c
===================================================================drivers/char/tty_io.c +2
-2@@ -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" );
H. Peter Anvin
Acked-byQuoted 4 lines · Serge E. Hallyn
Quoted 3 lines · Quoting sukadev-r/[email protected]…
From: Sukadev Bhattiprolu <sukadev-r/[email protected]>
Subject: [PATCH]: Propagate error code fromdevpts_pty_new
Quoted 8 lines
Quoted 4 lines
Have
ptmx_open()propagate any error code returned bydevpts_pty_new()(which returns either 0 or-ENOMEManyway).Signed-off-by Sukadev Bhattiprolu <sukadev-r/[email protected]>Seems nice and non-contentuous.