From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: re: mfd: 88pm800: Enhance sub devices initialization
Date: Tue, 18 Jun 2013 14:05:22 +0000 [thread overview]
Message-ID: <20130618140521.GA9128@elgon.mountain> (raw)
Hello Chao Xie,
This is a semi-automatic email about new static checker warnings.
The patch 1e9f033e4b6c: "mfd: 88pm800: Enhance sub devices
initialization" from Jun 14, 2013, leads to the following Smatch
complaint:
drivers/mfd/88pm800.c:504 device_800_init()
error: we previously assumed 'pdata' could be null (see line 480)
drivers/mfd/88pm800.c
479 if (val & PM800_ALARM_WAKEUP) {
480 if (pdata && pdata->rtc)
^^^^^
Old check.
481 pdata->rtc->rtc_wakeup = 1;
482 }
483
484 ret = device_gpadc_init(chip, pdata);
485 if (ret < 0) {
486 dev_err(chip->dev, "[%s]Failed to init gpadc\n", __func__);
487 goto out;
488 }
489
490 chip->regmap_irq_chip = &pm800_irq_chip;
491
492 ret = device_irq_init_800(chip);
493 if (ret < 0) {
494 dev_err(chip->dev, "[%s]Failed to init pm800 irq\n", __func__);
495 goto out;
496 }
497
498 ret = device_onkey_init(chip, pdata);
499 if (ret) {
500 dev_err(chip->dev, "Failed to add onkey subdev\n");
501 goto out_dev;
502 }
503
504 ret = device_rtc_init(chip, pdata);
^^^^^
New dereference.
505 if (ret) {
506 dev_err(chip->dev, "Failed to add rtc subdev\n");
regards,
dan carpenter
reply other threads:[~2013-06-18 14:05 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=20130618140521.GA9128@elgon.mountain \
--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