Skip to content

Commit

Permalink
USB: keyspan: fix bogus array index
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Johan Hovold authored and Greg Kroah-Hartman committed Jun 4, 2013
1 parent d8a1d0d commit a070880
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/serial/keyspan.c
Original file line number Diff line number Diff line change
Expand Up @@ -1559,7 +1559,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;

dev_dbg(&port->dev, "%s - endpoint %d\n", __func__, usb_pipeendpoint(this_urb->pipe));
Expand Down

0 comments on commit a070880

Please sign in to comment.