summaryrefslogtreecommitdiff
path: root/drivers/media/usb/uvc/uvc_video.c
diff options
context:
space:
mode:
authorEzequiel Garcia <elezegarcia@gmail.com>2012-09-26 07:30:34 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-10-06 12:25:21 -0300
commit5712661d643099bda44909cfd75560fcda72c387 (patch)
treeb74b822a070b9de0008d790c9087ab8c9627d8b2 /drivers/media/usb/uvc/uvc_video.c
parente0f6e4d6ff8d82ca6813f47d12f85224d7491d9e (diff)
[media] uvc: Add return code check at vb2_queue_init()
This function returns an integer and it's mandatory to check the return code. Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/usb/uvc/uvc_video.c')
-rw-r--r--drivers/media/usb/uvc/uvc_video.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/media/usb/uvc/uvc_video.c b/drivers/media/usb/uvc/uvc_video.c
index 1c15b4227bdb..57c3076a4625 100644
--- a/drivers/media/usb/uvc/uvc_video.c
+++ b/drivers/media/usb/uvc/uvc_video.c
@@ -1755,7 +1755,9 @@ int uvc_video_init(struct uvc_streaming *stream)
atomic_set(&stream->active, 0);
/* Initialize the video buffers queue. */
- uvc_queue_init(&stream->queue, stream->type, !uvc_no_drop_param);
+ ret = uvc_queue_init(&stream->queue, stream->type, !uvc_no_drop_param);
+ if (ret)
+ return ret;
/* Alternate setting 0 should be the default, yet the XBox Live Vision
* Cam (and possibly other devices) crash or otherwise misbehave if