提交 8d2f9e8e 编写于 作者: J Julia Lawall 提交者: Tero Kristo

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: NJulia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: NTero Kristo <t-kristo@ti.com>
上级 6c7ee890
...@@ -77,13 +77,11 @@ static int dra7_apll_enable(struct clk_hw *hw) ...@@ -77,13 +77,11 @@ static int dra7_apll_enable(struct clk_hw *hw)
if (i == MAX_APLL_WAIT_TRIES) { if (i == MAX_APLL_WAIT_TRIES) {
pr_warn("clock: %s failed transition to '%s'\n", pr_warn("clock: %s failed transition to '%s'\n",
clk_name, (state) ? "locked" : "bypassed"); clk_name, (state) ? "locked" : "bypassed");
} else { r = -EBUSY;
} else
pr_debug("clock: %s transition to '%s' in %d loops\n", pr_debug("clock: %s transition to '%s' in %d loops\n",
clk_name, (state) ? "locked" : "bypassed", i); clk_name, (state) ? "locked" : "bypassed", i);
r = 0;
}
return r; return r;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册