clk: Add error handling to clk_fetch_parent_index()
authorTomasz Figa <tomasz.figa@gmail.com>
Sun, 29 Sep 2013 00:37:14 +0000 (02:37 +0200)
committerMike Turquette <mturquette@linaro.org>
Wed, 2 Oct 2013 01:40:16 +0000 (18:40 -0700)
commitf1c8b2edf916b5be9dc29e98989a5eaff3c6e75b
treee46e0af10ea370a78ed7ed33c615e68988d2f3e1
parent15c03dd4859ab16f9212238f29dd315654aa94f6
clk: Add error handling to clk_fetch_parent_index()

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