mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
usb: gadget: function: uvc: conditionally dequeue
We shouldn't try to dequeue a NULL pointer. Signed-off-by: Felipe Balbi <[email protected]>
This commit is contained in:
parent
7a60855972
commit
d7577b3892
1 changed files with 2 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue