]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
media: hantro: remove an unnecessary NULL check
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 7 Jun 2019 13:56:09 +0000 (09:56 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Fri, 21 Jun 2019 20:19:06 +0000 (16:19 -0400)
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>
drivers/staging/media/hantro/hantro_v4l2.c

index b4af8c659a98e385975c5a200083c22720720432..68f45ee668211b17546f65960cf959de779e9aa4 100644 (file)
@@ -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);
        }