提交 00c5aa17 编写于 作者: D David Mosberger-Tang 提交者: Greg Kroah-Hartman

usb: host: max3421-hcd: Fix missing unlock in max3421_urb_enqueue()

Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NDavid Mosberger <davidm@egauge.net>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 ff1fcd50
...@@ -1545,8 +1545,10 @@ max3421_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, gfp_t mem_flags) ...@@ -1545,8 +1545,10 @@ max3421_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, gfp_t mem_flags)
if (!max3421_ep) { if (!max3421_ep) {
/* gets freed in max3421_endpoint_disable: */ /* gets freed in max3421_endpoint_disable: */
max3421_ep = kzalloc(sizeof(struct max3421_ep), mem_flags); max3421_ep = kzalloc(sizeof(struct max3421_ep), mem_flags);
if (!max3421_ep) if (!max3421_ep) {
return -ENOMEM; retval = -ENOMEM;
goto out;
}
max3421_ep->ep = urb->ep; max3421_ep->ep = urb->ep;
max3421_ep->last_active = max3421_hcd->frame_number; max3421_ep->last_active = max3421_hcd->frame_number;
urb->ep->hcpriv = max3421_ep; urb->ep->hcpriv = max3421_ep;
...@@ -1561,6 +1563,7 @@ max3421_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, gfp_t mem_flags) ...@@ -1561,6 +1563,7 @@ max3421_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, gfp_t mem_flags)
wake_up_process(max3421_hcd->spi_thread); wake_up_process(max3421_hcd->spi_thread);
} }
out:
spin_unlock_irqrestore(&max3421_hcd->lock, flags); spin_unlock_irqrestore(&max3421_hcd->lock, flags);
return retval; return retval;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册