• Tomasz Figa's avatar
    clk: Add error handling to clk_fetch_parent_index() · f1c8b2ed
    Tomasz Figa authored
    There are at least two different error cases that can happen in
    clk_fetch_parent_index() function:
     - allocation failure,
     - parent clock lookup failure,
    however it returns only an u8, which is supposed to contain parent clock
    index.
    
    This patch modified the function to return full int instead allowing
    positive clock indices and negative error codes to be returned. All
    users of this function are adjusted as well to handle the return value
    correctly.
    Signed-off-by: default avatarTomasz Figa <tomasz.figa@gmail.com>
    Signed-off-by: default avatarMike Turquette <mturquette@linaro.org>
    f1c8b2ed
clk.c 54.3 KB