From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: [bug report] regulator: axp20x: add support for set_ramp_delay for AXP209
Date: Sat, 15 Dec 2018 09:41:52 +0000 [thread overview]
Message-ID: <20181215094152.GA6075@kadam> (raw)
Hello Olliver Schinagl,
This is a semi-automatic email about new static checker warnings.
The patch d29f54df8b16: "regulator: axp20x: add support for
set_ramp_delay for AXP209" from Dec 11, 2018, leads to the following
Smatch complaint:
drivers/regulator/axp20x-regulator.c:375 axp20x_set_ramp_delay()
warn: variable dereferenced before check 'rdev' (see line 369)
drivers/regulator/axp20x-regulator.c
368 {
369 struct axp20x_dev *axp20x = rdev_get_drvdata(rdev);
^^^^
370 const struct regulator_desc *desc = rdev->desc;
^^^^^^^^^^
Dereferences
371 u8 reg, mask, enable, cfg = 0xff;
372 const int *slew_rates;
373 int rate_count = 0;
374
375 if (!rdev)
^^^^^
Check too late.
376 return -EINVAL;
377
regards,
dan carpenter
reply other threads:[~2018-12-15 9:41 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=20181215094152.GA6075@kadam \
--to=dan.carpenter@oracle.com \
--cc=kernel-janitors@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