clk: Correct lookup logic in clk_fetch_parent_index()
authorTomasz Figa <tomasz.figa@gmail.com>
Sun, 29 Sep 2013 00:37:16 +0000 (02:37 +0200)
committerMike Turquette <mturquette@linaro.org>
Wed, 2 Oct 2013 01:40:17 +0000 (18:40 -0700)
commitda0f0b2c3ad2ad9533c8c5cae84ad88d57a5e8dc
tree3243504931bfc96ef4ebf4963a9cdac45d27d9c0
parent96a7ed9079a3483c5681b17f4713c37c1cf2b1c9
clk: Correct lookup logic in clk_fetch_parent_index()

This function is supposed to iterate over all parents of given child
clock to find the index of given parent clock in its parent list,
using parent cache if possible and falling back to string compare
otherwise. However currently the logic falls back to string compare in
every iteration in which clock cache entry does not match given parent,
due to wrong check conditions.

This patch corrects the logic to continue the loop if parent cache entry
is present and does not match requested parent clock. In addition,
redundant checks for parent cache array presence are removed, because it
is always allocated in the beginning of the function.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
drivers/clk/clk.c
This page took 0.025807 seconds and 5 git commands to generate.