Commit 3ad0531d authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman

USB: serial: cypress_m8: fix interrupt-out transfer length

[ Upstream commit 56445eef ]

Fix interrupt-out transfer length which was being set to the
transfer-buffer length rather than the size of the outgoing packet.

Note that no slab data was leaked as the whole transfer buffer is always
cleared before each transfer.

Fixes: 9aa8dae7 ("cypress_m8: use usb_fill_int_urb where appropriate")
Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 24ce099a
...@@ -769,7 +769,7 @@ static void cypress_send(struct usb_serial_port *port) ...@@ -769,7 +769,7 @@ static void cypress_send(struct usb_serial_port *port)
usb_fill_int_urb(port->interrupt_out_urb, port->serial->dev, usb_fill_int_urb(port->interrupt_out_urb, port->serial->dev,
usb_sndintpipe(port->serial->dev, port->interrupt_out_endpointAddress), usb_sndintpipe(port->serial->dev, port->interrupt_out_endpointAddress),
port->interrupt_out_buffer, port->interrupt_out_size, port->interrupt_out_buffer, actual_size,
cypress_write_int_callback, port, priv->write_urb_interval); cypress_write_int_callback, port, priv->write_urb_interval);
result = usb_submit_urb(port->interrupt_out_urb, GFP_ATOMIC); result = usb_submit_urb(port->interrupt_out_urb, GFP_ATOMIC);
if (result) { if (result) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment