Skip to content

Commit

Permalink
usb: fix null deferences in low level usb serial
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jason Wessel authored and Linus Torvalds committed Sep 8, 2008
1 parent af904de commit 06dd881
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/serial/console.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 06dd881

Please sign in to comment.