From: Dan Carpenter <dan.carpenter@oracle.com>
To: broonie@opensource.wolfsonmicro.com
Cc: linux-kernel@vger.kernel.org
Subject: re: regulator: core: Use a struct to pass in regulator runtime configuration
Date: Wed, 11 Apr 2012 12:06:49 +0300 [thread overview]
Message-ID: <20120411090649.GA32589@elgon.mountain> (raw)
Hello Mark Brown,
This is a semi-automatic email about new static checker warnings.
The patch c172708d38a4: "regulator: core: Use a struct to pass in
regulator runtime configuration" from Apr 4, 2012, leads to the
following Smatch complaint:
drivers/regulator/core.c:2860 regulator_register()
warn: variable dereferenced before check 'config' (see line 2856)
drivers/regulator/core.c
2855 struct regulator_dev *rdev;
2856 struct device *dev = config->dev;
^^^^^^^^^^^
New dereference.
2857 int ret, i;
2858 const char *supply = NULL;
2859
2860 if (regulator_desc == NULL || config == NULL)
^^^^^^^^^^^^^^
New check.
2861 return ERR_PTR(-EINVAL);
2862
regards,
dan carpenter
reply other threads:[~2012-04-11 9:07 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20120411090649.GA32589@elgon.mountain \
--to=dan.carpenter@oracle.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=linux-kernel@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