• Tomasz Figa's avatar
    clk: Correct lookup logic in clk_fetch_parent_index() · da0f0b2c
    Tomasz Figa authored
    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: default avatarTomasz Figa <tomasz.figa@gmail.com>
    Signed-off-by: default avatarMike Turquette <mturquette@linaro.org>
    da0f0b2c
clk.c 54.3 KB