提交 06dd881f 编写于 作者: J Jason Wessel 提交者: Linus Torvalds

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: NJason Wessel <jason.wessel@windriver.com>
Signed-off-by: NAlan Cox <alan@redhat.com>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 af904dea
...@@ -161,7 +161,7 @@ static int usb_console_setup(struct console *co, char *options) ...@@ -161,7 +161,7 @@ static int usb_console_setup(struct console *co, char *options)
if (serial->type->set_termios) { if (serial->type->set_termios) {
termios->c_cflag = cflag; termios->c_cflag = cflag;
tty_termios_encode_baud_rate(termios, baud, baud); 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; port->port.tty = NULL;
kfree(termios); kfree(termios);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册