From 94b5bf3ac9c4b34a2b1516772c63fb94da6ad5d3 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Fri, 7 Jun 2019 09:56:09 -0400 Subject: [PATCH] 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 Reviewed-by: Boris Brezillon [hverkuil-cisco@xs4all.nl: rebased after rockchip/vpu -> hantro rename] Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/media/hantro/hantro_v4l2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } -- 2.30.2