From: Dan Carpenter <dan.carpenter@oracle.com>
To: durgadoss.r@intel.com
Cc: Zhang Rui <rui.zhang@intel.com>, linux-kernel@vger.kernel.org
Subject: re: Thermal: Update binding logic based on platform data
Date: Tue, 25 Sep 2012 23:27:47 +0300 [thread overview]
Message-ID: <20120925202747.GA19537@elgon.mountain> (raw)
Hello Durgadoss R,
This is a semi-automatic email about new static checker warnings.
The patch 9b70dfa68ae8: "Thermal: Update binding logic based on
platform data" from Sep 18, 2012, leads to the following Smatch
complaint:
drivers/thermal/thermal_sys.c:292 bind_tz()
error: we previously assumed 'tzp' could be null (see line 283)
drivers/thermal/thermal_sys.c
282 /* If there is no platform data, try to use ops->bind */
283 if (!tzp && tz->ops->bind) {
^^^^
New check.
284 list_for_each_entry(pos, &thermal_cdev_list, node) {
285 ret = tz->ops->bind(tz, pos);
286 if (ret)
287 print_bind_err_msg(tz, pos, ret);
288 }
289 goto exit;
290 }
291
292 if (!tzp->tbp)
^^^^^^^^
New dereference.
293 goto exit;
294
There are also some locking bugs which need to be fixed as well.
drivers/thermal/thermal_sys.c:268 bind_cdev() warn: inconsistent returns mutex:&thermal_list_lock: locked (256) unlocked (268)
drivers/thermal/thermal_sys.c:396 update_temperature() warn: inconsistent returns mutex:&tz->lock: locked (390) unlocked (396)
regards,
dan carpenter
next reply other threads:[~2012-09-25 20:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-25 20:27 Dan Carpenter [this message]
2012-09-26 14:39 ` R, Durgadoss
2012-09-26 17:20 ` Dan Carpenter
2012-09-27 6:13 ` R, Durgadoss
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=20120925202747.GA19537@elgon.mountain \
--to=dan.carpenter@oracle.com \
--cc=durgadoss.r@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rui.zhang@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
Powered by JetHome