summaryrefslogtreecommitdiff
path: root/drivers/usb/serial/console.c
diff options
context:
space:
mode:
authorPeter Hurley <peter@hurleysoftware.com>2016-01-10 08:13:48 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-01-28 01:28:20 +0300
commita3123fd0a4a5f9d71afa0ffa82e2086281d81822 (patch)
tree563a30f70d71188c107b242c4735edb0e9fe3435 /drivers/usb/serial/console.c
parenta99cc5d9954651ac7402dcd40b133848303ba596 (diff)
downloadlinux-a3123fd0a4a5f9d71afa0ffa82e2086281d81822.tar.xz
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/console.c')
-rw-r--r--drivers/usb/serial/console.c6
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;