Commit f0e3e35c authored by Bjørn Mork's avatar Bjørn Mork Committed by Greg Kroah-Hartman

USB: keyspan: fix typo causing GPF on open

Commit f79b2d0f (USB: keyspan: fix NULL-pointer dereferences and
memory leaks) had a small typo which made the driver use wrong
offsets when mapping serial port private data.  This results in
in a GPF when the port is opened.
Reported-by: default avatarRichard <richjunk@pacbell.net>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: default avatarBjørn Mork <bjorn@mork.no>
Acked-by: default avatarJohan Hovold <jhovold@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d99e65bd
...@@ -2430,7 +2430,7 @@ static void keyspan_release(struct usb_serial *serial) ...@@ -2430,7 +2430,7 @@ static void keyspan_release(struct usb_serial *serial)
static int keyspan_port_probe(struct usb_serial_port *port) static int keyspan_port_probe(struct usb_serial_port *port)
{ {
struct usb_serial *serial = port->serial; struct usb_serial *serial = port->serial;
struct keyspan_port_private *s_priv; struct keyspan_serial_private *s_priv;
struct keyspan_port_private *p_priv; struct keyspan_port_private *p_priv;
const struct keyspan_device_details *d_details; const struct keyspan_device_details *d_details;
struct callbacks *cback; struct callbacks *cback;
...@@ -2445,7 +2445,6 @@ static int keyspan_port_probe(struct usb_serial_port *port) ...@@ -2445,7 +2445,6 @@ static int keyspan_port_probe(struct usb_serial_port *port)
if (!p_priv) if (!p_priv)
return -ENOMEM; return -ENOMEM;
s_priv = usb_get_serial_data(port->serial);
p_priv->device_details = d_details; p_priv->device_details = d_details;
/* Setup values for the various callback routines */ /* Setup values for the various callback routines */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment