소스 검색

[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>
Ezequiel Garcia 13 년 전
부모
커밋
4195ec7a8f
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      drivers/media/platform/vivi.c

+ 3 - 1
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);