summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEzequiel Garcia <elezegarcia@gmail.com>2012-09-17 09:49:38 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-09-27 04:47:48 -0300
commit4195ec7a8fa253cb7e598a8f99f005bc97d4ac15 (patch)
tree4b47fcdfc05378f42ac8874ce40de311c57988ff
parent47054a357a788620b9ede8c678a2cec71c7155ea (diff)
[media] vivi: 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> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/platform/vivi.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/media/platform/vivi.c b/drivers/media/platform/vivi.c
index c396da12ad89..b366b050a3dd 100644
--- a/drivers/media/platform/vivi.c
+++ b/drivers/media/platform/vivi.c
@@ -1314,7 +1314,9 @@ static int __init vivi_create_instance(int inst)
q->ops = &vivi_video_qops;
q->mem_ops = &vb2_vmalloc_memops;
- vb2_queue_init(q);
+ ret = vb2_queue_init(q);
+ if (ret)
+ goto unreg_dev;
mutex_init(&dev->mutex);