aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohan Hovold2013-06-26 16:47:31 +0200
committerGreg Kroah-Hartman2013-07-23 16:24:33 -0700
commitdc43ff924d0d29e53e3f4d26db2c4265b1aa5a2a (patch)
treee339833acb19fcf16a2b62ec45e63a1bb6dd96b9
parent3ba19fe31b726371b45f91a8de9341f5625e75e4 (diff)
USB: oti6858: do not call set_termios with uninitialised data
Make sure set_termios is not called with uninitialised data at open. The old termios struct is currently not used, but pass NULL instead to avoid future problems (e.g. stack data leak). Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/usb/serial/oti6858.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/serial/oti6858.c b/drivers/usb/serial/oti6858.c
index baa2ea59b921..a2080ac7b7e5 100644
--- a/drivers/usb/serial/oti6858.c
+++ b/drivers/usb/serial/oti6858.c
@@ -508,7 +508,6 @@ static void oti6858_set_termios(struct tty_struct *tty,
static int oti6858_open(struct tty_struct *tty, struct usb_serial_port *port)
{
struct oti6858_private *priv = usb_get_serial_port_data(port);
- struct ktermios tmp_termios;
struct usb_serial *serial = port->serial;
struct oti6858_control_pkt *buf;
unsigned long flags;
@@ -559,7 +558,7 @@ static int oti6858_open(struct tty_struct *tty, struct usb_serial_port *port)
/* setup termios */
if (tty)
- oti6858_set_termios(tty, port, &tmp_termios);
+ oti6858_set_termios(tty, port, NULL);
return 0;
}