[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202211100831.8C6B603B6@keescook>
Date: Thu, 10 Nov 2022 08:31:04 -0800
From: coverity-bot <keescook@...omium.org>
To: Benjamin Mugnier <benjamin.mugnier@...s.st.com>
Cc: linux-kernel@...r.kernel.org,
Sakari Ailus <sakari.ailus@...ux.intel.com>,
Jean-Michel Hautbois <jeanmichel.hautbois@...asonboard.com>,
Shawn Tu <shawnx.tu@...el.com>, linux-media@...r.kernel.org,
Sylvain Petinot <sylvain.petinot@...s.st.com>,
Laurent Pinchart <laurent.pinchart+renesas@...asonboard.com>,
Hans Verkuil <hverkuil@...all.nl>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
"Gustavo A. R. Silva" <gustavo@...eddedor.com>,
linux-next@...r.kernel.org, linux-hardening@...r.kernel.org
Subject: Coverity: vgxy61_patch(): Control flow issues
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 1527250: Control flow issues (NO_EFFECT)
drivers/media/i2c/st-vgxy61.c:1626 in vgxy61_patch()
1620
1621 ret = vgxy61_poll_reg(sensor, VGXY61_REG_STBY, 0, VGXY61_TIMEOUT_MS);
1622 if (ret)
1623 return ret;
1624
1625 patch = vgxy61_read_reg(sensor, VGXY61_REG_FWPATCH_REVISION);
vvv CID 1527250: Control flow issues (NO_EFFECT)
vvv This less-than-zero comparison of an unsigned value is never true. "patch < 0".
1626 if (patch < 0)
1627 return patch;
1628
1629 if (patch != (VGXY61_FWPATCH_REVISION_MAJOR << 12) +
1630 (VGXY61_FWPATCH_REVISION_MINOR << 8) +
1631 VGXY61_FWPATCH_REVISION_MICRO) {
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@...omium.org>
Addresses-Coverity-ID: 1527250 ("Control flow issues")
Fixes: 153e4ad44d60 ("media: i2c: Add driver for ST VGXY61 camera sensor")
Thanks for your attention!
--
Coverity-bot
Powered by blists - more mailing lists