summaryrefslogtreecommitdiffstats
path: root/drivers/staging/media
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2019-06-07 09:56:09 -0400
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2019-06-21 16:19:06 -0400
commit94b5bf3ac9c4b34a2b1516772c63fb94da6ad5d3 (patch)
treeb2a2bdd19673d62ca4431f7c9aac29892280b515 /drivers/staging/media
parent4b1f67dc8edcb4a1e8a1d141609d89fa7d430d46 (diff)
downloadlinux-94b5bf3ac9c4b34a2b1516772c63fb94da6ad5d3.tar.bz2
media: hantro: remove an unnecessary NULL check
Thus the address of "&ctx->dev->variant->codec_ops[codec_mode]" can't possibly be NULL. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> [hverkuil-cisco@xs4all.nl: rebased after rockchip/vpu -> hantro rename] Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/staging/media')
-rw-r--r--drivers/staging/media/hantro/hantro_v4l2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/media/hantro/hantro_v4l2.c b/drivers/staging/media/hantro/hantro_v4l2.c
index b4af8c659a98..68f45ee66821 100644
--- a/drivers/staging/media/hantro/hantro_v4l2.c
+++ b/drivers/staging/media/hantro/hantro_v4l2.c
@@ -613,7 +613,7 @@ static int hantro_start_streaming(struct vb2_queue *q, unsigned int count)
vpu_debug(4, "Codec mode = %d\n", codec_mode);
ctx->codec_ops = &ctx->dev->variant->codec_ops[codec_mode];
- if (ctx->codec_ops && ctx->codec_ops->init)
+ if (ctx->codec_ops->init)
ret = ctx->codec_ops->init(ctx);
}