Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7cc7ee28263e89793ae4d21e6e0102404c9a037b
Commit:     7cc7ee28263e89793ae4d21e6e0102404c9a037b
Parent:     adb5dca17dde297b685d57ec68fa0e5490feee8b
Author:     Alan Cox <[EMAIL PROTECTED]>
AuthorDate: Thu Oct 18 01:24:18 2007 -0700
Committer:  Greg Kroah-Hartman <[EMAIL PROTECTED]>
CommitDate: Thu Oct 25 12:18:40 2007 -0700

    usb serial: kill another case we pass NULL and shouldn't
    
    Signed-off-by: Alan Cox <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 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 9386e21..0362654 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);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to