diff options
Diffstat (limited to 'drivers/usb/core/hcd.c')
-rw-r--r-- | drivers/usb/core/hcd.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index ec17fc4d2861..8b17babf5c55 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c | |||
@@ -1266,9 +1266,6 @@ int usb_hcd_unlink_urb (struct urb *urb, int status) | |||
1266 | */ | 1266 | */ |
1267 | void usb_hcd_giveback_urb (struct usb_hcd *hcd, struct urb *urb) | 1267 | void usb_hcd_giveback_urb (struct usb_hcd *hcd, struct urb *urb) |
1268 | { | 1268 | { |
1269 | unmap_urb_for_dma(hcd, urb); | ||
1270 | usbmon_urb_complete (&hcd->self, urb); | ||
1271 | usb_unanchor_urb(urb); | ||
1272 | urb->hcpriv = NULL; | 1269 | urb->hcpriv = NULL; |
1273 | if (unlikely(urb->unlinked)) | 1270 | if (unlikely(urb->unlinked)) |
1274 | urb->status = urb->unlinked; | 1271 | urb->status = urb->unlinked; |
@@ -1277,6 +1274,10 @@ void usb_hcd_giveback_urb (struct usb_hcd *hcd, struct urb *urb) | |||
1277 | !urb->status)) | 1274 | !urb->status)) |
1278 | urb->status = -EREMOTEIO; | 1275 | urb->status = -EREMOTEIO; |
1279 | 1276 | ||
1277 | unmap_urb_for_dma(hcd, urb); | ||
1278 | usbmon_urb_complete(&hcd->self, urb); | ||
1279 | usb_unanchor_urb(urb); | ||
1280 | |||
1280 | /* pass ownership to the completion handler */ | 1281 | /* pass ownership to the completion handler */ |
1281 | urb->complete (urb); | 1282 | urb->complete (urb); |
1282 | atomic_dec (&urb->use_count); | 1283 | atomic_dec (&urb->use_count); |