diff options
author | Alan Cox <alan@lxorguk.ukuu.org.uk> | 2007-10-18 01:24:18 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-10-25 12:18:40 -0700 |
commit | 7cc7ee28263e89793ae4d21e6e0102404c9a037b (patch) | |
tree | ca54d962a6faf99fbdd1396e43ef5383328a8f2c /drivers/usb/serial/console.c | |
parent | adb5dca17dde297b685d57ec68fa0e5490feee8b (diff) |
usb serial: kill another case we pass NULL and shouldn't
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/serial/console.c')
-rw-r--r-- | drivers/usb/serial/console.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/usb/serial/console.c b/drivers/usb/serial/console.c index 9386e216d681..0362654d3b52 100644 --- a/drivers/usb/serial/console.c +++ b/drivers/usb/serial/console.c @@ -164,6 +164,7 @@ static int usb_console_setup(struct console *co, char *options) } if (serial->type->set_termios) { + struct ktermios dummy; /* build up a fake tty structure so that the open call has something * to look at to get the cflag value */ tty = kzalloc(sizeof(*tty), GFP_KERNEL); @@ -177,12 +178,13 @@ static int usb_console_setup(struct console *co, char *options) kfree (tty); return -ENOMEM; } + memset(&dummy, 0, sizeof(struct ktermios)); termios->c_cflag = cflag; tty->termios = termios; port->tty = tty; /* set up the initial termios settings */ - serial->type->set_termios(port, NULL); + serial->type->set_termios(port, &dummy); port->tty = NULL; kfree (termios); kfree (tty); |