diff options
author | Philipp Zabel <p.zabel@pengutronix.de> | 2015-03-11 12:57:50 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-04-10 09:47:34 -0300 |
commit | d5451c1d9257622105a1c5bee732c050b3e82cf0 (patch) | |
tree | 68429035ed4e4524daca373259eb75ab96962566 /drivers/media | |
parent | e6c9dec3e7d68c477768e2955c7f8ed78a09bfd6 (diff) | |
download | linux-d5451c1d9257622105a1c5bee732c050b3e82cf0.tar.gz linux-d5451c1d9257622105a1c5bee732c050b3e82cf0.tar.bz2 linux-d5451c1d9257622105a1c5bee732c050b3e82cf0.zip |
[media] v4l2-mem2mem: no need to initialize b in v4l2_m2m_next_buf and v4l2_m2m_buf_remove
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>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/v4l2-core/v4l2-mem2mem.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/v4l2-core/v4l2-mem2mem.c b/drivers/media/v4l2-core/v4l2-mem2mem.c index 80c588f4e429..73824a5ada83 100644 --- a/drivers/media/v4l2-core/v4l2-mem2mem.c +++ b/drivers/media/v4l2-core/v4l2-mem2mem.c @@ -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); |