projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7a60855
)
usb: gadget: function: uvc: conditionally dequeue
author
Felipe Balbi
<balbi@ti.com>
Mon, 29 Sep 2014 14:19:59 +0000
(09:19 -0500)
committer
Felipe Balbi
<balbi@ti.com>
Mon, 20 Oct 2014 20:58:48 +0000
(15:58 -0500)
We shouldn't try to dequeue a NULL pointer.
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/gadget/function/uvc_video.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/usb/gadget/function/uvc_video.c
b/drivers/usb/gadget/function/uvc_video.c
index c3e1f27dbbefd2da1763766ab4cdbabc09ce4fb3..9cb86bc1a9a5444b4ed7895489c2b0c5860bac37 100644
(file)
--- a/
drivers/usb/gadget/function/uvc_video.c
+++ b/
drivers/usb/gadget/function/uvc_video.c
@@
-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);