[PATCH v5 20/25] usb: chipidea: isr_reset_handler fix missing locking

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Michael Grzeschik <m.grzeschik@xxxxxxxxxxxxxx>

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@xxxxxxxxxxxxxx>
[rebased on top of the patchset]
Signed-off-by: Alexander Shishkin <alexander.shishkin@xxxxxxxxxxxxxxx>
---
 drivers/usb/chipidea/udc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c
index 4c1fde9..99f4853 100644
--- a/drivers/usb/chipidea/udc.c
+++ b/drivers/usb/chipidea/udc.c
@@ -671,9 +671,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);
 }
-- 
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


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux