From: Jason Wessel Date: Mon, 8 Sep 2008 13:53:37 +0000 (+0100) Subject: usb: fix null deferences in low level usb serial X-Git-Tag: v2.6.27-rc6~20 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=06dd881f59b3c07a430cdcbef2197f9b6dc79ae8;p=linux-2.6 usb: fix null deferences in low level usb serial The hw interface drivers for the usb serial devices deference the tty structure to set up the parameters for the initial console. The tty structure should be passed as a parameter to the set_termios() call. Signed-off-by: Jason Wessel Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds --- diff --git a/drivers/usb/serial/console.c b/drivers/usb/serial/console.c index 7b74238ad1..e980766bb8 100644 --- a/drivers/usb/serial/console.c +++ b/drivers/usb/serial/console.c @@ -161,7 +161,7 @@ static int usb_console_setup(struct console *co, char *options) if (serial->type->set_termios) { termios->c_cflag = cflag; tty_termios_encode_baud_rate(termios, baud, baud); - serial->type->set_termios(NULL, port, &dummy); + serial->type->set_termios(tty, port, &dummy); port->port.tty = NULL; kfree(termios);