From: Dan Carpenter <dan.carpenter@oracle.com>
To: bingbu.cao@intel.com
Cc: linux-media@vger.kernel.org
Subject: [bug report] media: ov2740: allow OTP data access during streaming
Date: Wed, 2 Dec 2020 17:48:17 +0300 [thread overview]
Message-ID: <X8epMQZcpSx0xLiZ@mwanda> (raw)
Hello Bingbu Cao,
This is a semi-automatic email about new static checker warnings.
The patch 5e6fd339b68d: "media: ov2740: allow OTP data access during
streaming" from Nov 13, 2020, leads to the following Smatch complaint:
drivers/media/i2c/ov2740.c:609 ov2740_load_otp_data()
warn: variable dereferenced before check 'nvm' (see line 603)
drivers/media/i2c/ov2740.c
601 static int ov2740_load_otp_data(struct nvm_data *nvm)
602 {
603 struct i2c_client *client = nvm->client;
^^^^^^^^^^^
Dereference
604 struct ov2740 *ov2740 = to_ov2740(i2c_get_clientdata(client));
605 u32 isp_ctrl00 = 0;
606 u32 isp_ctrl01 = 0;
607 int ret;
608
609 if (!nvm)
^^^^
Checked too late.
610 return -EINVAL;
611
regards,
dan carpenter
next reply other threads:[~2020-12-02 14:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-02 14:48 Dan Carpenter [this message]
2020-12-03 2:49 ` [bug report] media: ov2740: allow OTP data access during streaming Cao, Bingbu
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=X8epMQZcpSx0xLiZ@mwanda \
--to=dan.carpenter@oracle.com \
--cc=bingbu.cao@intel.com \
--cc=linux-media@vger.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