aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/staging/octeon-usb/octeon-hcd.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/staging/octeon-usb/octeon-hcd.c b/drivers/staging/octeon-usb/octeon-hcd.c
index 59cf921f1b59..a65b708b804a 100644
--- a/drivers/staging/octeon-usb/octeon-hcd.c
+++ b/drivers/staging/octeon-usb/octeon-hcd.c
@@ -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;
- urb->actual_length = bytes_transferred;
+ 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

Privacy Policy