From 4195ec7a8fa253cb7e598a8f99f005bc97d4ac15 Mon Sep 17 00:00:00 2001 From: Ezequiel Garcia Date: Mon, 17 Sep 2012 09:49:38 -0300 Subject: [PATCH] [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 Signed-off-by: Mauro Carvalho Chehab --- drivers/media/platform/vivi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); -- 2.30.2