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>
This commit is contained in:
Mathias Nyman 2017-05-17 18:31:59 +03:00 committed by Greg Kroah-Hartman
parent 5120a26692
commit 7bc5d5aff3
1 changed files with 1 additions and 1 deletions

View File

@ -641,8 +641,8 @@ static void xhci_giveback_urb_in_irq(struct xhci_hcd *xhci,
xhci_urb_free_priv(urb_priv);
usb_hcd_unlink_urb_from_ep(hcd, urb);
spin_unlock(&xhci->lock);
usb_hcd_giveback_urb(hcd, urb, status);
trace_xhci_urb_giveback(urb);
usb_hcd_giveback_urb(hcd, urb, status);
spin_lock(&xhci->lock);
}