Commit 94b5bf3a authored by Dan Carpenter's avatar Dan Carpenter Committed by Mauro Carvalho Chehab

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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarBoris Brezillon <boris.brezillon@collabora.com>
[hverkuil-cisco@xs4all.nl: rebased after rockchip/vpu -> hantro rename]
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent 4b1f67dc
...@@ -613,7 +613,7 @@ static int hantro_start_streaming(struct vb2_queue *q, unsigned int count) ...@@ -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); vpu_debug(4, "Codec mode = %d\n", codec_mode);
ctx->codec_ops = &ctx->dev->variant->codec_ops[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); ret = ctx->codec_ops->init(ctx);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment