Skip to content

Commit

Permalink
USB: xhci: drop spinlock in xhci_urb_enqueue() error path.
Browse files Browse the repository at this point in the history
Make sure the error path in xhci_urb_enqueue() releases the spinlock
before it returns.  Reported by Oliver in
	http://marc.info/?l=linux-usb&m=124091637311832&w=2

Reported-by: Oliver Neukum <oliver@neukum.org>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Sarah Sharp authored and Greg Kroah-Hartman committed Jun 16, 2009
1 parent f0058c6 commit c7959fb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/usb/host/xhci-hcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,8 @@ int xhci_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, gfp_t mem_flags)
if (!xhci->devs || !xhci->devs[slot_id]) {
if (!in_interrupt())
dev_warn(&urb->dev->dev, "WARN: urb submitted for dev with no Slot ID\n");
return -EINVAL;
ret = -EINVAL;
goto exit;
}
if (!test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags)) {
if (!in_interrupt())
Expand Down

0 comments on commit c7959fb

Please sign in to comment.