[PATCH] clk: Fix cached parent ptrs allocation

Prashant Gaikwad pgaikwad at nvidia.com
Wed Jul 4 21:10:46 EDT 2012

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 at nvidia.com>
> ---
> 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.

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


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

More information about the linux-arm-kernel mailing list