From: Michael Grzeschik Date: Fri, 11 May 2012 14:25:50 +0000 (+0300) Subject: usb: chipidea: isr_reset_handler fix missing locking X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=b9322252727bc3af6e64b8d75058403edeaddea5;p=linux-beck.git usb: chipidea: isr_reset_handler fix missing locking Move spin_lock under the done label, so the lock will also be pulled in the error paths. Signed-off-by: Michael Grzeschik [rebased on top of the patchset] Signed-off-by: Alexander Shishkin Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c index 9133a59450f4..ddd27d3443f8 100644 --- a/drivers/usb/chipidea/udc.c +++ b/drivers/usb/chipidea/udc.c @@ -645,9 +645,9 @@ __acquires(udc->lock) if (udc->status == NULL) retval = -ENOMEM; +done: spin_lock(&udc->lock); - done: if (retval) dev_err(udc->dev, "error: %i\n", retval); }