usb: chipidea: isr_reset_handler fix missing locking
authorMichael Grzeschik <m.grzeschik@pengutronix.de>
Fri, 11 May 2012 14:25:50 +0000 (17:25 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 May 2012 23:54:11 +0000 (16:54 -0700)
Move spin_lock under the done label, so the
lock will also be pulled in the error paths.

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
[rebased on top of the patchset]
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/chipidea/udc.c

index 9133a59450f46ef64057f6266ca0f0a675f3be3e..ddd27d3443f8c30423f4df4f32facafb3caac2b0 100644 (file)
@@ -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);
 }