Skip to content

Commit

Permalink
clk: ti: dra7: return error code in failure case
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Julia Lawall authored and Tero Kristo committed Jun 19, 2014
1 parent 6c7ee89 commit 8d2f9e8
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/clk/ti/apll.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,11 @@ static int dra7_apll_enable(struct clk_hw *hw)
if (i == MAX_APLL_WAIT_TRIES) {
pr_warn("clock: %s failed transition to '%s'\n",
clk_name, (state) ? "locked" : "bypassed");
} else {
r = -EBUSY;
} else
pr_debug("clock: %s transition to '%s' in %d loops\n",
clk_name, (state) ? "locked" : "bypassed", i);

r = 0;
}

return r;
}

Expand Down

0 comments on commit 8d2f9e8

Please sign in to comment.