提交 d7577b38 编写于 作者: F Felipe Balbi

usb: gadget: function: uvc: conditionally dequeue

We shouldn't try to dequeue a NULL pointer.
Signed-off-by: NFelipe Balbi <balbi@ti.com>
上级 7a608559
......@@ -352,7 +352,8 @@ int uvcg_video_enable(struct uvc_video *video, int enable)
if (!enable) {
for (i = 0; i < UVC_NUM_REQUESTS; ++i)
usb_ep_dequeue(video->ep, video->req[i]);
if (video->req[i])
usb_ep_dequeue(video->ep, video->req[i]);
uvc_video_free_requests(video);
uvcg_queue_enable(&video->queue, 0);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册