Skip to content

Commit

Permalink
usb: gadget: uvc: Use GFP_ATOMIC under spin lock
Browse files Browse the repository at this point in the history
Found using the following semantic patch:
<spml>
@@
@@
spin_lock_irqsave(...);
... when != spin_unlock_irqrestore(...);
* GFP_KERNEL
</spml>

Signed-off-by: Cyril Roelandt <tipecaml@gmail.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Bhupesh Sharma <bhupesh.sharma@st.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
  • Loading branch information
Cyril Roelandt authored and Felipe Balbi committed Mar 18, 2013
1 parent 326b0e6 commit 6854bcd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/usb/gadget/uvc_video.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 6854bcd

Please sign in to comment.