[media] dt3155v4l: vb2_queue_init() can now fail. Check is required
authorMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 27 Oct 2012 17:57:31 +0000 (14:57 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sun, 28 Oct 2012 09:38:37 +0000 (07:38 -0200)
drivers/staging/media/dt3155v4l/dt3155v4l.c: In function 'dt3155_open':
drivers/staging/media/dt3155v4l/dt3155v4l.c:399:17: warning: ignoring return value of 'vb2_queue_init', declared with attribute warn_unused_result [-Wunused-result]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/staging/media/dt3155v4l/dt3155v4l.c

index 2e7b711..54f1813 100644 (file)
@@ -396,7 +396,9 @@ dt3155_open(struct file *filp)
                pd->q->drv_priv = pd;
                pd->curr_buf = NULL;
                pd->field_count = 0;
-               vb2_queue_init(pd->q); /* cannot fail */
+               ret = vb2_queue_init(pd->q);
+               if (ret < 0)
+                       return ret;
                INIT_LIST_HEAD(&pd->dmaq);
                spin_lock_init(&pd->lock);
                /* disable all irqs, clear all irq flags */