提交 6854bcdc 编写于 作者: C Cyril Roelandt 提交者: Felipe Balbi

usb: gadget: uvc: Use GFP_ATOMIC under spin lock

Found using the following semantic patch:
<spml>
@@
@@
spin_lock_irqsave(...);
... when != spin_unlock_irqrestore(...);
* GFP_KERNEL
</spml>
Signed-off-by: NCyril Roelandt <tipecaml@gmail.com>
Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: NBhupesh Sharma <bhupesh.sharma@st.com>
Signed-off-by: NFelipe Balbi <balbi@ti.com>
上级 326b0e61
......@@ -314,7 +314,8 @@ uvc_video_pump(struct uvc_video *video)
video->encode(req, video, buf);
/* Queue the USB request */
if ((ret = usb_ep_queue(video->ep, req, GFP_KERNEL)) < 0) {
ret = usb_ep_queue(video->ep, req, GFP_ATOMIC);
if (ret < 0) {
printk(KERN_INFO "Failed to queue request (%d)\n", ret);
usb_ep_set_halt(video->ep);
spin_unlock_irqrestore(&video->queue.irqlock, flags);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册