[media] v4l2-mem2mem: no need to initialize b in v4l2_m2m_next_buf and v4l2_m2m_buf_r...
authorPhilipp Zabel <p.zabel@pengutronix.de>
Wed, 11 Mar 2015 15:57:50 +0000 (12:57 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Fri, 10 Apr 2015 12:47:34 +0000 (09:47 -0300)
The first time b is used, it is assigned to the first element of the rdy_queue
list. There is no need to set it to NULL before.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/v4l2-core/v4l2-mem2mem.c

index 80c588f4e4290643b98674de129e31d0c164f257..73824a5ada83788fff9b143b36cf0eff5cec24bc 100644 (file)
@@ -97,7 +97,7 @@ EXPORT_SYMBOL(v4l2_m2m_get_vq);
  */
 void *v4l2_m2m_next_buf(struct v4l2_m2m_queue_ctx *q_ctx)
 {
-       struct v4l2_m2m_buffer *b = NULL;
+       struct v4l2_m2m_buffer *b;
        unsigned long flags;
 
        spin_lock_irqsave(&q_ctx->rdy_spinlock, flags);
@@ -119,7 +119,7 @@ EXPORT_SYMBOL_GPL(v4l2_m2m_next_buf);
  */
 void *v4l2_m2m_buf_remove(struct v4l2_m2m_queue_ctx *q_ctx)
 {
-       struct v4l2_m2m_buffer *b = NULL;
+       struct v4l2_m2m_buffer *b;
        unsigned long flags;
 
        spin_lock_irqsave(&q_ctx->rdy_spinlock, flags);