Commit 75fc235f authored by Paul Walmsley's avatar Paul Walmsley Committed by Tony Lindgren

OMAP2/3 clock: omap2_clk_enable(): fix usecount decrement bug

If _omap2_clk_enable() fails, the clock's usecount must be decremented by
one no matter whether the clock has a parent or not.
Signed-off-by: default avatarPaul Walmsley <paul@pwsan.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 6d6e285e
......@@ -502,12 +502,10 @@ int omap2_clk_enable(struct clk *clk)
ret = _omap2_clk_enable(clk);
if (ret != 0) {
clk->usecount--;
omap2_clkdm_clk_disable(clk->clkdm.ptr, clk);
if (clk->parent) {
if (clk->parent)
omap2_clk_disable(clk->parent);
clk->usecount--;
}
}
return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment