public inbox for linux-clk@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: boris.brezillon@free-electrons.com
Cc: linux-clk@vger.kernel.org
Subject: re: clk: change clk_ops' ->determine_rate() prototype
Date: Fri, 10 Jul 2015 11:26:12 +0300	[thread overview]
Message-ID: <20150710082612.GC29999@mwanda> (raw)

Hello Boris Brezillon,

This is a semi-automatic email about new static checker warnings.

The patch 4a7c639697ef: "clk: change clk_ops' ->determine_rate() 
prototype" from Jul 7, 2015, leads to the following Smatch complaint:

drivers/clk/clk.c:458 clk_mux_determine_rate_flags()
	 error: we previously assumed 'parent' could be null (see line 452)

drivers/clk/clk.c
   451			if (core->flags & CLK_SET_RATE_PARENT) {
   452				ret = __clk_determine_rate(parent ? parent->hw : NULL,
                                                           ^^^^^^
Check for NULL.

   453							   &parent_req);
   454				if (ret)
   455					return ret;
   456	
   457				best = parent_req.rate;
   458				req->best_parent_hw = parent->hw;
                                                      ^^^^^^^^^^
Patch adds unchecked dereference.

   459				req->best_parent_rate = best;
   460			} else if (parent) {

regards,
dan carpenter

             reply	other threads:[~2015-07-10  8:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-10  8:26 Dan Carpenter [this message]
2015-07-13 22:41 ` clk: change clk_ops' ->determine_rate() prototype Stephen Boyd
2015-07-14 10:45   ` Boris Brezillon

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=20150710082612.GC29999@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=boris.brezillon@free-electrons.com \
    --cc=linux-clk@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