Thread (106 messages) 106 messages, 18 authors, 2012-04-11

[PATCH v7 2/3] clk: introduce the common clock framework

From: Turquette, Mike <hidden>
Date: 2012-03-19 19:54:23
Also in: lkml

On Mon, Mar 19, 2012 at 4:22 AM, Rajendra Nayak [off-list ref] wrote:
On Friday 16 March 2012 11:41 AM, Mike Turquette wrote:
quoted
+/*
+ * calculate the new rates returning the topmost clock that has to be
+ * changed.
+ */
+static struct clk *clk_calc_new_rates(struct clk *clk, unsigned long
rate)
+{
+ ? ? ? struct clk *top = clk;
+ ? ? ? unsigned long best_parent_rate = clk->parent->rate;

Shouldn't you check for a valid parent before dereferencing it? A
clk_set_rate() on a root clock might throw up some issues otherwise.
Yes, the clk_calc_new_rates code assumes a valid parent pointer in
several locations.  Thanks for the catch.  Will roll into my fixes
series.

Regards,
Mike
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help