Move spin_lock under the done label, so the lock will also be pulled in the error pathes. Signed-off-by: Michael Grzeschik <m.grzeschik@xxxxxxxxxxxxxx> --- drivers/usb/gadget/ci13xxx_udc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/usb/gadget/ci13xxx_udc.c b/drivers/usb/gadget/ci13xxx_udc.c index 9af8216..9283ab0 100644 --- a/drivers/usb/gadget/ci13xxx_udc.c +++ b/drivers/usb/gadget/ci13xxx_udc.c @@ -1702,9 +1702,8 @@ __acquires(udc->lock) if (udc->status == NULL) retval = -ENOMEM; - spin_lock(udc->lock); - done: + spin_lock(udc->lock); if (retval) err("error: %i", retval); } -- 1.7.10 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html