浏览代码

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 <jason.wessel@windriver.com>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jason Wessel 16 年之前
父节点
当前提交
06dd881f59
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/usb/serial/console.c

+ 1 - 1
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);