Commit 6854bcdc authored by Cyril Roelandt's avatar Cyril Roelandt Committed by 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: default avatarCyril Roelandt <tipecaml@gmail.com>
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: default avatarBhupesh Sharma <bhupesh.sharma@st.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 326b0e61
...@@ -314,7 +314,8 @@ uvc_video_pump(struct uvc_video *video) ...@@ -314,7 +314,8 @@ uvc_video_pump(struct uvc_video *video)
video->encode(req, video, buf); video->encode(req, video, buf);
/* Queue the USB request */ /* 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); printk(KERN_INFO "Failed to queue request (%d)\n", ret);
usb_ep_set_halt(video->ep); usb_ep_set_halt(video->ep);
spin_unlock_irqrestore(&video->queue.irqlock, flags); spin_unlock_irqrestore(&video->queue.irqlock, flags);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment