summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohan Hovold <jhovold@gmail.com>2013-06-04 18:50:29 +0200
committerBen Hutchings <ben@decadent.org.uk>2013-06-19 02:16:55 +0100
commit698cb96b51f336c18f4ca48597565bd3097f5d48 (patch)
tree3bca391ea0518618d6e20bb4e5f99707dcd0b28e
parent94dbc341c33589c6cb3c2e60414250c9e1535968 (diff)
USB: keyspan: fix bogus array index
commit a07088098a650267b2eda689538133a324b9523f upstream. The outcont_endpoints array was indexed using the port minor number (which can be greater than the array size) rather than the device port number. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
-rw-r--r--drivers/usb/serial/keyspan.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/serial/keyspan.c b/drivers/usb/serial/keyspan.c
index a442352d7b61..4f415e28b2eb 100644
--- a/drivers/usb/serial/keyspan.c
+++ b/drivers/usb/serial/keyspan.c
@@ -1833,7 +1833,7 @@ static int keyspan_usa26_send_setup(struct usb_serial *serial,
d_details = s_priv->device_details;
device_port = port->number - port->serial->minor;
- outcont_urb = d_details->outcont_endpoints[port->number];
+ outcont_urb = d_details->outcont_endpoints[device_port];
this_urb = p_priv->outcont_urb;
dbg("%s - endpoint %d", __func__, usb_pipeendpoint(this_urb->pipe));