Re: [PATCH] clk: Fix cached parent ptrs allocation

From: Prashant Gaikwad
Date: Wed Jul 04 2012 - 21:10:58 EST


On Wednesday 04 July 2012 06:45 PM, Prashant Gaikwad wrote:
Compiler optimizes code someway that even if clk->parents
is not NULL it tries to allocate parents array. Change the
condition so that compiler does not optimize it in wrong
way.

Also, initialize i to num_parents to make sure parent
is searched using parent name if parents is NULL.

Signed-off-by: Prashant Gaikwad<pgaikwad@xxxxxxxxxx>
---
Mike,

There could be some other way to fix problem. I have not
debugged it in detail but I think this simple change should do.
Mike,

Please ignore this patch as Rajendra has already sent patch to fix.

http://git.linaro.org/gitweb?p=people/mturquette/linux.git;a=commitdiff;h=863b13271f1608ab3af6f7a371047d9a66693e38

drivers/clk/clk.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/