aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMathias Nyman <mathias.nyman@linux.intel.com>2017-05-17 11:31:59 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-05-18 09:19:41 -0400
commit7bc5d5aff356f3ba16c4d1e9eaf95cc99b7574ab (patch)
tree8ab8eaafc6423ada11e7199261c152b2a96beeac
parent5120a266928a07231d198bb518f6fe73148786a3 (diff)
usb: xhci: trace URB before giving it back instead of after
Don't access any members of a URB after giving it back. URB might be freed by then already. Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/usb/host/xhci-ring.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index 74bf5c60a260..507ba7734b94 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -641,8 +641,8 @@ static void xhci_giveback_urb_in_irq(struct xhci_hcd *xhci,
641 xhci_urb_free_priv(urb_priv); 641 xhci_urb_free_priv(urb_priv);
642 usb_hcd_unlink_urb_from_ep(hcd, urb); 642 usb_hcd_unlink_urb_from_ep(hcd, urb);
643 spin_unlock(&xhci->lock); 643 spin_unlock(&xhci->lock);
644 usb_hcd_giveback_urb(hcd, urb, status);
645 trace_xhci_urb_giveback(urb); 644 trace_xhci_urb_giveback(urb);
645 usb_hcd_giveback_urb(hcd, urb, status);
646 spin_lock(&xhci->lock); 646 spin_lock(&xhci->lock);
647} 647}
648 648