diff options
author | Peter Hurley <peter@hurleysoftware.com> | 2016-01-09 21:13:48 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-01-27 14:28:20 -0800 |
commit | a3123fd0a4a5f9d71afa0ffa82e2086281d81822 (patch) | |
tree | 563a30f70d71188c107b242c4735edb0e9fe3435 /drivers/tty/pty.c | |
parent | a99cc5d9954651ac7402dcd40b133848303ba596 (diff) |
tty: Fix tty_init_termios() declaration
tty_init_termios() never returns an error; re-declare as void. Remove
unnecessary error handling from callers. Remove extern declarations
of tty_free_termios() and free_tty_struct() and re-declare in file
scope.
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Acked-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/pty.c')
-rw-r--r-- | drivers/tty/pty.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/drivers/tty/pty.c b/drivers/tty/pty.c index 8cbe802bff1d..7e885a226f88 100644 --- a/drivers/tty/pty.c +++ b/drivers/tty/pty.c @@ -406,13 +406,8 @@ static int pty_common_install(struct tty_driver *driver, struct tty_struct *tty, if (legacy) { /* We always use new tty termios data so we can do this the easy way .. */ - retval = tty_init_termios(tty); - if (retval) - goto err_free_tty; - - retval = tty_init_termios(o_tty); - if (retval) - goto err_free_termios; + tty_init_termios(tty); + tty_init_termios(o_tty); driver->other->ttys[idx] = o_tty; driver->ttys[idx] = tty; @@ -444,11 +439,7 @@ static int pty_common_install(struct tty_driver *driver, struct tty_struct *tty, tty->count++; o_tty->count++; return 0; -err_free_termios: - if (legacy) - tty_free_termios(tty); -err_free_tty: - free_tty_struct(o_tty); + err_put_module: module_put(driver->other->owner); err: |