提交 65582a7f 编写于 作者: S Sudeep Holla 提交者: Felipe Balbi

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: NDan Carpenter <dan.carpenter@oracle.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Felipe Balbi <balbi@ti.com>
Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
Signed-off-by: NFelipe Balbi <balbi@ti.com>
上级 bc465aa9
...@@ -1203,7 +1203,7 @@ static int isp1760_udc_start(struct usb_gadget *gadget, ...@@ -1203,7 +1203,7 @@ static int isp1760_udc_start(struct usb_gadget *gadget,
if (udc->driver) { if (udc->driver) {
dev_err(udc->isp->dev, "UDC already has a gadget driver\n"); dev_err(udc->isp->dev, "UDC already has a gadget driver\n");
spin_unlock(&udc->lock); spin_unlock_irqrestore(&udc->lock, flags);
return -EBUSY; return -EBUSY;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册