aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host
diff options
context:
space:
mode:
authorSarah Sharp <sarah.a.sharp@linux.intel.com>2009-04-29 22:06:36 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2009-06-16 00:44:50 -0400
commitc7959fb265d8d5e00eb6d30717eb63e6189a1f07 (patch)
treeee479989ec423d5b9d9f7a5c6cdb47259d73ecaf /drivers/usb/host
parentf0058c627855ecb3b6c7185b7ad1910463c24c42 (diff)
USB: xhci: drop spinlock in xhci_urb_enqueue() error path.
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>
Diffstat (limited to 'drivers/usb/host')
-rw-r--r--drivers/usb/host/xhci-hcd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/host/xhci-hcd.c b/drivers/usb/host/xhci-hcd.c
index 57aed12b63d2..c6b921994b28 100644
--- a/drivers/usb/host/xhci-hcd.c
+++ b/drivers/usb/host/xhci-hcd.c
@@ -591,7 +591,8 @@ int xhci_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, gfp_t mem_flags)
591 if (!xhci->devs || !xhci->devs[slot_id]) { 591 if (!xhci->devs || !xhci->devs[slot_id]) {
592 if (!in_interrupt()) 592 if (!in_interrupt())
593 dev_warn(&urb->dev->dev, "WARN: urb submitted for dev with no Slot ID\n"); 593 dev_warn(&urb->dev->dev, "WARN: urb submitted for dev with no Slot ID\n");
594 return -EINVAL; 594 ret = -EINVAL;
595 goto exit;
595 } 596 }
596 if (!test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags)) { 597 if (!test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags)) {
597 if (!in_interrupt()) 598 if (!in_interrupt())