diff options
author | Felipe Balbi <balbi@ti.com> | 2014-09-29 09:19:59 -0500 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2014-10-20 15:58:48 -0500 |
commit | d7577b389233a74609841492feaf6a55967aa5c8 (patch) | |
tree | 52d40cbc85b860f9076770da4d494448779bd126 /drivers/usb | |
parent | 7a60855972f0d3c014093046cb6f013a1ee5bb19 (diff) | |
download | linux-d7577b389233a74609841492feaf6a55967aa5c8.tar.bz2 |
usb: gadget: function: uvc: conditionally dequeue
We shouldn't try to dequeue a NULL pointer.
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/gadget/function/uvc_video.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/gadget/function/uvc_video.c b/drivers/usb/gadget/function/uvc_video.c index c3e1f27dbbef..9cb86bc1a9a5 100644 --- 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); |