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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
	}