From: Mauro Carvalho Chehab Date: Sat, 27 Oct 2012 17:57:31 +0000 (-0300) Subject: [media] dt3155v4l: vb2_queue_init() can now fail. Check is required X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=067d85134a81e2c2a5566d93760e5f398e83a15e;p=linux-beck.git [media] dt3155v4l: vb2_queue_init() can now fail. Check is required 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 --- diff --git a/drivers/staging/media/dt3155v4l/dt3155v4l.c b/drivers/staging/media/dt3155v4l/dt3155v4l.c index 2e7b711c8501..54f1813aa1ef 100644 --- a/drivers/staging/media/dt3155v4l/dt3155v4l.c +++ b/drivers/staging/media/dt3155v4l/dt3155v4l.c @@ -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 */