Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a0708809 authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman
Browse files

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: default avatarJohan Hovold <jhovold@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d8a1d0d5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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));