[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-usb
Subject:    [PATCH 31/33] xhci: drop spinlock in xhci_urb_enqueue() error path.
From:       Sarah Sharp <sarah.a.sharp () linux ! intel ! com>
Date:       2009-04-30 2:06:36
Message-ID: 20090430020636.GA31238 () gamba ! jf ! intel ! com
[Download RAW message or body]

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>
---
 drivers/usb/host/xhci-hcd.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/host/xhci-hcd.c b/drivers/usb/host/xhci-hcd.c
index 57aed12..c6b9219 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())
-- 
1.5.6.5

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic