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

Commit 8dcf4ece authored by Aaro Koskinen's avatar Aaro Koskinen Committed by Greg Kroah-Hartman
Browse files

staging: octeon-usb: return transferred bytes only on success



Return transferred bytes only when transfer was successful.

Signed-off-by: default avatarAaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d8c39d3f
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -2162,7 +2162,11 @@ static void octeon_usb_urb_complete_callback(struct cvmx_usb_state *usb,
	struct usb_hcd *hcd = octeon_to_hcd(priv);
	struct device *dev = hcd->self.controller;

	if (likely(status == CVMX_USB_COMPLETE_SUCCESS))
		urb->actual_length = bytes_transferred;
	else
		urb->actual_length = 0;

	urb->hcpriv = NULL;

	/* For Isochronous transactions we need to update the URB packet status