diff options
author | Julia Lawall <Julia.Lawall@lip6.fr> | 2014-05-19 07:25:48 -0400 |
---|---|---|
committer | Tero Kristo <t-kristo@ti.com> | 2014-06-19 07:52:31 -0400 |
commit | 8d2f9e8eca807479c83c8f765b6859838da618eb (patch) | |
tree | a433b3d127650d24d7ee4d54451c399fc2bf718b /drivers/clk/ti | |
parent | 6c7ee8905d54e66d01902c59490bbc99d87d4efb (diff) |
clk: ti: dra7: return error code in failure case
Add a returned error code in the MAX_APLL_WAIT_TRIES case. Remove the
updating of the return variable r to 0 if MAX_APLL_WAIT_TRIES is not yet
reached, because r is already 0 at this point.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Diffstat (limited to 'drivers/clk/ti')
-rw-r--r-- | drivers/clk/ti/apll.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/clk/ti/apll.c b/drivers/clk/ti/apll.c index 18dbaf128a39..72d97279eae1 100644 --- a/drivers/clk/ti/apll.c +++ b/drivers/clk/ti/apll.c | |||
@@ -77,13 +77,11 @@ static int dra7_apll_enable(struct clk_hw *hw) | |||
77 | if (i == MAX_APLL_WAIT_TRIES) { | 77 | if (i == MAX_APLL_WAIT_TRIES) { |
78 | pr_warn("clock: %s failed transition to '%s'\n", | 78 | pr_warn("clock: %s failed transition to '%s'\n", |
79 | clk_name, (state) ? "locked" : "bypassed"); | 79 | clk_name, (state) ? "locked" : "bypassed"); |
80 | } else { | 80 | r = -EBUSY; |
81 | } else | ||
81 | pr_debug("clock: %s transition to '%s' in %d loops\n", | 82 | pr_debug("clock: %s transition to '%s' in %d loops\n", |
82 | clk_name, (state) ? "locked" : "bypassed", i); | 83 | clk_name, (state) ? "locked" : "bypassed", i); |
83 | 84 | ||
84 | r = 0; | ||
85 | } | ||
86 | |||
87 | return r; | 85 | return r; |
88 | } | 86 | } |
89 | 87 | ||