From: Rui Miguel Silva <rmfrfs@gmail.com>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>,
Steve Longerbeam <slongerbeam@gmail.com>
Subject: Re: [PATCH] imx7: fix smatch error
Date: Wed, 20 Feb 2019 11:25:24 +0000 [thread overview]
Message-ID: <m37eduu2fv.fsf@gmail.com> (raw)
In-Reply-To: <3958dde6-b934-f2d9-f522-ce2b001496d9@xs4all.nl>
Hi Hans,
Thanks for the patch.
On Wed 20 Feb 2019 at 08:59, Hans Verkuil wrote:
> Fixes this smatch error:
>
> drivers/staging/media/imx/imx7-mipi-csis.c:716
> mipi_csis_set_fmt() error: we previously assumed 'fmt' could
> beor null (see line 709)
>
> fmt is never NULL, so remove the 'fmt &&' condition.
>
> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com>
---
Cheers,
Rui
> ---
> diff --git a/drivers/staging/media/imx/imx7-mipi-csis.c
> b/drivers/staging/media/imx/imx7-mipi-csis.c
> index f4674de09e83..a5f7bbc41c61 100644
> --- a/drivers/staging/media/imx/imx7-mipi-csis.c
> +++ b/drivers/staging/media/imx/imx7-mipi-csis.c
> @@ -706,7 +706,7 @@ static int mipi_csis_set_fmt(struct
> v4l2_subdev *mipi_sd,
> fmt = mipi_csis_get_format(state, cfg, sdformat->which,
> sdformat->pad);
>
> mutex_lock(&state->lock);
> - if (fmt && sdformat->pad == CSIS_PAD_SOURCE) {
> + if (sdformat->pad == CSIS_PAD_SOURCE) {
> sdformat->format = *fmt;
> goto unlock;
> }
prev parent reply other threads:[~2019-02-20 11:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-20 8:59 [PATCH] imx7: fix smatch error Hans Verkuil
2019-02-20 11:25 ` Rui Miguel Silva [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=m37eduu2fv.fsf@gmail.com \
--to=rmfrfs@gmail.com \
--cc=hverkuil@xs4all.nl \
--cc=linux-media@vger.kernel.org \
--cc=slongerbeam@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.