From: Ezequiel Garcia Date: Mon, 17 Sep 2012 12:49:38 +0000 (-0300) Subject: [media] vivi: Add return code check at vb2_queue_init() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4195ec7a8fa253cb7e598a8f99f005bc97d4ac15;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [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 --- 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);