From: coverity-bot <keescook@chromium.org>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: linux-kernel@vger.kernel.org,
Alexander Stein <alexander.stein@ew.tq-group.com>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Manivannan Sadhasivam <mani@kernel.org>,
linux-media@vger.kernel.org,
Mauro Carvalho Chehab <mchehab@kernel.org>,
"Gustavo A. R. Silva" <gustavo@embeddedor.com>,
linux-next@vger.kernel.org, linux-hardening@vger.kernel.org
Subject: Coverity: imx290_ctrl_init(): Error handling issues
Date: Thu, 10 Nov 2022 08:30:46 -0800 [thread overview]
Message-ID: <202211100830.1F097DC@keescook> (raw)
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:38:02 2022 +0300
4c9c93cf8657 ("media: i2c: imx290: Create controls for fwnode properties")
Coverity reported the following:
*** CID 1527251: Error handling issues (CHECKED_RETURN)
drivers/media/i2c/imx290.c:1056 in imx290_ctrl_init()
1050 imx290->vblank = v4l2_ctrl_new_std(&imx290->ctrls, &imx290_ctrl_ops,
1051 V4L2_CID_VBLANK, blank, blank, 1,
1052 blank);
1053 if (imx290->vblank)
1054 imx290->vblank->flags |= V4L2_CTRL_FLAG_READ_ONLY;
1055
vvv CID 1527251: Error handling issues (CHECKED_RETURN)
vvv Calling "v4l2_ctrl_new_fwnode_properties" without checking return value (as is done elsewhere 9 out of 10 times).
1056 v4l2_ctrl_new_fwnode_properties(&imx290->ctrls, &imx290_ctrl_ops,
1057 &props);
1058
1059 imx290->sd.ctrl_handler = &imx290->ctrls;
1060
1061 if (imx290->ctrls.error) {
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: 1527251 ("Error handling issues")
Fixes: 4c9c93cf8657 ("media: i2c: imx290: Create controls for fwnode properties")
Thanks for your attention!
--
Coverity-bot
next reply other threads:[~2022-11-10 16:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-10 16:30 coverity-bot [this message]
2022-11-10 16:41 ` Coverity: imx290_ctrl_init(): Error handling issues Dave Stevenson
2022-11-10 16:56 ` Kees Cook
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=202211100830.1F097DC@keescook \
--to=keescook@chromium.org \
--cc=alexander.stein@ew.tq-group.com \
--cc=gustavo@embeddedor.com \
--cc=laurent.pinchart@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=mani@kernel.org \
--cc=mchehab@kernel.org \
--cc=sakari.ailus@linux.intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox