aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/keyspan.c
diff options
context:
space:
mode:
authorBjørn Mork <bjorn@mork.no>2012-11-10 04:13:42 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-11-13 13:45:16 -0500
commitf0e3e35c9049087172c65302b42da8fe7ebb63a8 (patch)
tree335058e049cdb14578e3db412451a9e491795c60 /drivers/usb/serial/keyspan.c
parentd99e65bda806f49e192dd31e9b01959974dea3cd (diff)
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: Richard <richjunk@pacbell.net> Cc: stable <stable@vger.kernel.org> Signed-off-by: Bjørn Mork <bjorn@mork.no> Acked-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/serial/keyspan.c')
-rw-r--r--drivers/usb/serial/keyspan.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/serial/keyspan.c b/drivers/usb/serial/keyspan.c
index 7179b0c5f814..cff8dd5b462d 100644
--- a/drivers/usb/serial/keyspan.c
+++ b/drivers/usb/serial/keyspan.c
@@ -2430,7 +2430,7 @@ static void keyspan_release(struct usb_serial *serial)
2430static int keyspan_port_probe(struct usb_serial_port *port) 2430static int keyspan_port_probe(struct usb_serial_port *port)
2431{ 2431{
2432 struct usb_serial *serial = port->serial; 2432 struct usb_serial *serial = port->serial;
2433 struct keyspan_port_private *s_priv; 2433 struct keyspan_serial_private *s_priv;
2434 struct keyspan_port_private *p_priv; 2434 struct keyspan_port_private *p_priv;
2435 const struct keyspan_device_details *d_details; 2435 const struct keyspan_device_details *d_details;
2436 struct callbacks *cback; 2436 struct callbacks *cback;
@@ -2445,7 +2445,6 @@ static int keyspan_port_probe(struct usb_serial_port *port)
2445 if (!p_priv) 2445 if (!p_priv)
2446 return -ENOMEM; 2446 return -ENOMEM;
2447 2447
2448 s_priv = usb_get_serial_data(port->serial);
2449 p_priv->device_details = d_details; 2448 p_priv->device_details = d_details;
2450 2449
2451 /* Setup values for the various callback routines */ 2450 /* Setup values for the various callback routines */