public inbox for linux-clk@vger.kernel.org
 help / color / mirror / Atom feed
* re: clk: change clk_ops' ->determine_rate() prototype
@ 2015-07-10  8:26 Dan Carpenter
  2015-07-13 22:41 ` Stephen Boyd
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2015-07-10  8:26 UTC (permalink / raw)
  To: boris.brezillon; +Cc: linux-clk

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-07-14 10:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-10  8:26 clk: change clk_ops' ->determine_rate() prototype Dan Carpenter
2015-07-13 22:41 ` Stephen Boyd
2015-07-14 10:45   ` Boris Brezillon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox