From: Boris Brezillon <boris.brezillon@collabora.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
Heiko Stuebner <heiko@sntech.de>,
Hans Verkuil <hverkuil-cisco@xs4all.nl>,
Ezequiel Garcia <ezequiel@collabora.com>,
linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] media: rockchip/vpu: remove an unnecessary NULL check
Date: Fri, 7 Jun 2019 16:26:19 +0200 [thread overview]
Message-ID: <20190607162619.06a3186d@collabora.com> (raw)
In-Reply-To: <20190607135609.GA16718@mwanda>
On Fri, 7 Jun 2019 16:56:09 +0300
Dan Carpenter <dan.carpenter@oracle.com> wrote:
> 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>
> ---
> drivers/staging/media/rockchip/vpu/rockchip_vpu_v4l2.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/media/rockchip/vpu/rockchip_vpu_v4l2.c b/drivers/staging/media/rockchip/vpu/rockchip_vpu_v4l2.c
> index 1b80a45df8fe..42f4eb0abc8a 100644
> --- a/drivers/staging/media/rockchip/vpu/rockchip_vpu_v4l2.c
> +++ b/drivers/staging/media/rockchip/vpu/rockchip_vpu_v4l2.c
> @@ -619,7 +619,7 @@ static int rockchip_vpu_start_streaming(struct vb2_queue *q,
>
> 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);
> }
>
prev parent reply other threads:[~2019-06-07 14:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-07 13:56 [PATCH] media: rockchip/vpu: remove an unnecessary NULL check Dan Carpenter
2019-06-07 14:26 ` Boris Brezillon [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190607162619.06a3186d@collabora.com \
--to=boris.brezillon@collabora.com \
--cc=dan.carpenter@oracle.com \
--cc=ezequiel@collabora.com \
--cc=heiko@sntech.de \
--cc=hverkuil-cisco@xs4all.nl \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=mchehab@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).