Skip to content

Commit

Permalink
[media] vivi: Add return code check at vb2_queue_init()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ezequiel Garcia authored and Mauro Carvalho Chehab committed Sep 27, 2012
1 parent 47054a3 commit 4195ec7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/media/platform/vivi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 4195ec7

Please sign in to comment.