Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6854bcdc authored by Cyril Roelandt's avatar Cyril Roelandt Committed by Felipe Balbi
Browse files

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
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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);