]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
usb serial: kill another case we pass NULL and shouldn't
authorAlan Cox <alan@lxorguk.ukuu.org.uk>
Thu, 18 Oct 2007 08:24:18 +0000 (01:24 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 25 Oct 2007 19:18:40 +0000 (12:18 -0700)
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>
drivers/usb/serial/console.c

index 9386e216d68155caec8c9467ddfe4dd005c61859..0362654d3b52e8aa53453c6cb499a8d247a9f8b2 100644 (file)
@@ -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);