aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSudeep Holla <sudeep.holla@arm.com>2015-03-20 07:42:17 -0400
committerFelipe Balbi <balbi@ti.com>2015-03-24 12:38:58 -0400
commit65582a7f4ce5bd7a1fb61516d9c2476f4f166f4e (patch)
treebf012c910c79c488b31dd66cb9aef4db76498bf3
parentbc465aa9d045feb0e13b4a8f32cc33c1943f62d6 (diff)
usb: isp1760: fix spin unlock in the error path of isp1760_udc_start
Commit a124820de5fd ("usb: isp1760: fix possible deadlock in isp1760_udc_irq") replaced spin_{un,}lock with spin_{un,}lock_irq{save,restore}. However it missed an error path resulting in the smatch warning as below: drivers/usb/isp1760/isp1760-udc.c:1230 isp1760_udc_start() warn: inconsistent returns 'irqsave:flags'. Locked on: line 1207 Unlocked on: line 1199 This patch fixes the spin unlock in the error path in isp1760_udc_start thereby removing the smatch warning mentioned above. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: Felipe Balbi <balbi@ti.com> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
-rw-r--r--drivers/usb/isp1760/isp1760-udc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/isp1760/isp1760-udc.c b/drivers/usb/isp1760/isp1760-udc.c
index f32c292cc868..3fc4fe770253 100644
--- a/drivers/usb/isp1760/isp1760-udc.c
+++ b/drivers/usb/isp1760/isp1760-udc.c
@@ -1203,7 +1203,7 @@ static int isp1760_udc_start(struct usb_gadget *gadget,
1203 1203
1204 if (udc->driver) { 1204 if (udc->driver) {
1205 dev_err(udc->isp->dev, "UDC already has a gadget driver\n"); 1205 dev_err(udc->isp->dev, "UDC already has a gadget driver\n");
1206 spin_unlock(&udc->lock); 1206 spin_unlock_irqrestore(&udc->lock, flags);
1207 return -EBUSY; 1207 return -EBUSY;
1208 } 1208 }
1209 1209