From: Benjamin MUGNIER <benjamin.mugnier@foss.st.com>
To: coverity-bot <keescook@chromium.org>
Cc: <linux-kernel@vger.kernel.org>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>,
Shawn Tu <shawnx.tu@intel.com>, <linux-media@vger.kernel.org>,
Sylvain Petinot <sylvain.petinot@foss.st.com>,
Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
Hans Verkuil <hverkuil@xs4all.nl>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
"Gustavo A. R. Silva" <gustavo@embeddedor.com>,
<linux-next@vger.kernel.org>, <linux-hardening@vger.kernel.org>
Subject: Re: Coverity: vgxy61_detect(): Control flow issues
Date: Mon, 14 Nov 2022 14:16:30 +0100 [thread overview]
Message-ID: <d651b9bf-dbf5-8737-175f-454335aaef2b@foss.st.com> (raw)
In-Reply-To: <202211100828.FEDCDE7@keescook>
Hello,
Thank you for your report.
This issue, and all other reported control flow issues, are fixed in the
following patch: 'media: i2c: st-vgxy61: Fix smatch warnings'.
https://lore.kernel.org/linux-media/20221110134102.64990-1-benjamin.mugnier@foss.st.com/
On 11/10/22 17:28, coverity-bot wrote:
> Hello!
>
> This is an experimental semi-automated report about issues detected by
> Coverity from a scan of next-20221110 as part of the linux-next scan project:
> https://scan.coverity.com/projects/linux-next-weekly-scan
>
> You're getting this email because you were associated with the identified
> lines of code (noted below) that were touched by commits:
>
> Thu Oct 27 14:37:38 2022 +0300
> 153e4ad44d60 ("media: i2c: Add driver for ST VGXY61 camera sensor")
>
> Coverity reported the following:
>
> *** CID 1527257: Control flow issues (NO_EFFECT)
> drivers/media/i2c/st-vgxy61.c:1679 in vgxy61_detect()
> 1673 struct i2c_client *client = sensor->i2c_client;
> 1674 u16 id = 0;
> 1675 int ret;
> 1676 u8 st;
> 1677
> 1678 id = vgxy61_read_reg(sensor, VGXY61_REG_MODEL_ID);
> vvv CID 1527257: Control flow issues (NO_EFFECT)
> vvv This less-than-zero comparison of an unsigned value is never true. "id < 0".
> 1679 if (id < 0)
> 1680 return id;
> 1681 if (id != VG5661_MODEL_ID && id != VG5761_MODEL_ID) {
> 1682 dev_warn(&client->dev, "Unsupported sensor id %x\n", id);
> 1683 return -ENODEV;
> 1684 }
>
> If this is a false positive, please let us know so we can mark it as
> such, or teach the Coverity rules to be smarter. If not, please make
> sure fixes get into linux-next. :) For patches fixing this, please
> include these lines (but double-check the "Fixes" first):
>
> Reported-by: coverity-bot <keescook+coverity-bot@chromium.org>
> Addresses-Coverity-ID: 1527257 ("Control flow issues")
> Fixes: 153e4ad44d60 ("media: i2c: Add driver for ST VGXY61 camera sensor")
>
> Thanks for your attention!
>
--
Regards,
Benjamin
prev parent reply other threads:[~2022-11-14 13:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-10 16:28 Coverity: vgxy61_detect(): Control flow issues coverity-bot
2022-11-14 13:16 ` Benjamin MUGNIER [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=d651b9bf-dbf5-8737-175f-454335aaef2b@foss.st.com \
--to=benjamin.mugnier@foss.st.com \
--cc=gustavo@embeddedor.com \
--cc=hverkuil@xs4all.nl \
--cc=jeanmichel.hautbois@ideasonboard.com \
--cc=keescook@chromium.org \
--cc=laurent.pinchart+renesas@ideasonboard.com \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=sakari.ailus@linux.intel.com \
--cc=shawnx.tu@intel.com \
--cc=sylvain.petinot@foss.st.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.