[PATCH 3/4] vivi: Add return code check at vb2_queue_init()

DORMANTno replies

From: Ezequiel Garcia <hidden>
Date: 2012-09-17 13:49:41
Subsystem: media input infrastructure (v4l/dvb), the rest · Maintainers: Mauro Carvalho Chehab, Linus Torvalds

This function returns an integer and it's mandatory
to check the return code.

Signed-off-by: Ezequiel Garcia <redacted>
---
 drivers/media/platform/vivi.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/media/platform/vivi.c b/drivers/media/platform/vivi.c
index fca8019..c1401dd 100644
--- a/drivers/media/platform/vivi.c
+++ b/drivers/media/platform/vivi.c
@@ -1313,7 +1313,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);
 
-- 
1.7.8.6
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help