From c7959fb265d8d5e00eb6d30717eb63e6189a1f07 Mon Sep 17 00:00:00 2001 From: Sarah Sharp Date: Wed, 29 Apr 2009 19:06:36 -0700 Subject: [PATCH] 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 Signed-off-by: Sarah Sharp Signed-off-by: Greg Kroah-Hartman --- drivers/usb/host/xhci-hcd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) 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()) -- GitLab