From a85de2be7dad188e6c6b29ec998aea258a64ea1e Mon Sep 17 00:00:00 2001 From: lyz Date: Sun, 18 Jan 2015 23:37:11 +0800 Subject: [PATCH] usb: dwc_otg: fix a spin-lock error, here should not goto return without unlock hck->lock --- drivers/usb/dwc_otg_310/dwc_otg_hcd_linux.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/usb/dwc_otg_310/dwc_otg_hcd_linux.c b/drivers/usb/dwc_otg_310/dwc_otg_hcd_linux.c index 3a48dc3e52a3..e9eb036db319 100755 --- a/drivers/usb/dwc_otg_310/dwc_otg_hcd_linux.c +++ b/drivers/usb/dwc_otg_310/dwc_otg_hcd_linux.c @@ -1136,13 +1136,13 @@ static int urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status) } #endif - DWC_SPINLOCK_IRQSAVE(dwc_otg_hcd->lock, &flags); - if (((uint32_t) urb & 0xf0000000) == 0) { DWC_PRINTF("%s error: urb is %p!!!\n", __func__, urb); - goto out1; + return 0; } + DWC_SPINLOCK_IRQSAVE(dwc_otg_hcd->lock, &flags); + if (((uint32_t) urb->hcpriv & 0xf0000000) == 0) { DWC_PRINTF("%s error: urb->hcpriv %p urb %p, count %d!!!\n", __func__, urb->hcpriv, urb, @@ -1172,7 +1172,7 @@ out2: DWC_PRINTF("Called usb_hcd_giveback_urb()\n"); DWC_PRINTF(" urb->status = %d\n", urb->status); } -out1: + return 0; } -- 2.34.1