diff options
author | Peter Hurley <peter@hurleysoftware.com> | 2016-01-10 06:13:48 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-01-27 23:28:20 +0100 |
commit | a3123fd0a4a5f9d71afa0ffa82e2086281d81822 (patch) | |
tree | 563a30f70d71188c107b242c4735edb0e9fe3435 /drivers/usb/serial | |
parent | tty: Remove !tty check from free_tty_struct() (diff) | |
download | linux-a3123fd0a4a5f9d71afa0ffa82e2086281d81822.tar.xz linux-a3123fd0a4a5f9d71afa0ffa82e2086281d81822.zip |
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/usb/serial')
-rw-r--r-- | drivers/usb/serial/console.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/usb/serial/console.c b/drivers/usb/serial/console.c index 3806e7014199..a66b01bb1fa1 100644 --- a/drivers/usb/serial/console.c +++ b/drivers/usb/serial/console.c @@ -147,10 +147,7 @@ static int usb_console_setup(struct console *co, char *options) kref_get(&tty->driver->kref); __module_get(tty->driver->owner); tty->ops = &usb_console_fake_tty_ops; - if (tty_init_termios(tty)) { - retval = -ENOMEM; - goto put_tty; - } + tty_init_termios(tty); tty_port_tty_set(&port->port, tty); } @@ -185,7 +182,6 @@ static int usb_console_setup(struct console *co, char *options) fail: tty_port_tty_set(&port->port, NULL); - put_tty: tty_kref_put(tty); reset_open_count: port->port.count = 0; |