usb: dwc_otg: fix a spin-lock error, here should not goto return

without unlock hck->lock
This commit is contained in:
lyz
2015-01-18 23:37:11 +08:00
parent 4648d6a167
commit a85de2be7d

View File

@@ -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;
}