diff options
author | Johan Hovold <jhovold@gmail.com> | 2013-06-04 12:50:29 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-06-04 13:17:09 -0400 |
commit | a07088098a650267b2eda689538133a324b9523f (patch) | |
tree | 50578f0a7a780c6ebd141f063d9746dd64ec7510 | |
parent | d8a1d0d54d5fdac0347b75e9afd554b3dfaa465f (diff) |
USB: keyspan: fix bogus array index
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.
Cc: stable@vger.kernel.org
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/usb/serial/keyspan.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/serial/keyspan.c b/drivers/usb/serial/keyspan.c index eb30d7b01f36..d85a3e037490 100644 --- a/drivers/usb/serial/keyspan.c +++ b/drivers/usb/serial/keyspan.c | |||
@@ -1559,7 +1559,7 @@ static int keyspan_usa26_send_setup(struct usb_serial *serial, | |||
1559 | d_details = s_priv->device_details; | 1559 | d_details = s_priv->device_details; |
1560 | device_port = port->number - port->serial->minor; | 1560 | device_port = port->number - port->serial->minor; |
1561 | 1561 | ||
1562 | outcont_urb = d_details->outcont_endpoints[port->number]; | 1562 | outcont_urb = d_details->outcont_endpoints[device_port]; |
1563 | this_urb = p_priv->outcont_urb; | 1563 | this_urb = p_priv->outcont_urb; |
1564 | 1564 | ||
1565 | dev_dbg(&port->dev, "%s - endpoint %d\n", __func__, usb_pipeendpoint(this_urb->pipe)); | 1565 | dev_dbg(&port->dev, "%s - endpoint %d\n", __func__, usb_pipeendpoint(this_urb->pipe)); |