diff options
Diffstat (limited to 'arch/arm/mach-omap2/clock.c')
-rw-r--r-- | arch/arm/mach-omap2/clock.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c index 666274a8b10d..222c2c0d4a64 100644 --- a/arch/arm/mach-omap2/clock.c +++ b/arch/arm/mach-omap2/clock.c | |||
@@ -419,30 +419,30 @@ int omap2_clk_enable(struct clk *clk) | |||
419 | int ret = 0; | 419 | int ret = 0; |
420 | 420 | ||
421 | if (clk->usecount++ == 0) { | 421 | if (clk->usecount++ == 0) { |
422 | if (clk->parent) | 422 | if (clk->parent) { |
423 | ret = omap2_clk_enable(clk->parent); | 423 | ret = omap2_clk_enable(clk->parent); |
424 | 424 | if (ret) | |
425 | if (ret != 0) { | 425 | goto err; |
426 | clk->usecount--; | ||
427 | return ret; | ||
428 | } | 426 | } |
429 | 427 | ||
430 | if (clk->clkdm) | 428 | if (clk->clkdm) |
431 | omap2_clkdm_clk_enable(clk->clkdm, clk); | 429 | omap2_clkdm_clk_enable(clk->clkdm, clk); |
432 | 430 | ||
433 | ret = _omap2_clk_enable(clk); | 431 | ret = _omap2_clk_enable(clk); |
434 | 432 | if (ret) { | |
435 | if (ret != 0) { | ||
436 | if (clk->clkdm) | 433 | if (clk->clkdm) |
437 | omap2_clkdm_clk_disable(clk->clkdm, clk); | 434 | omap2_clkdm_clk_disable(clk->clkdm, clk); |
438 | 435 | ||
439 | if (clk->parent) { | 436 | if (clk->parent) |
440 | omap2_clk_disable(clk->parent); | 437 | omap2_clk_disable(clk->parent); |
441 | clk->usecount--; | 438 | |
442 | } | 439 | goto err; |
443 | } | 440 | } |
444 | } | 441 | } |
442 | return ret; | ||
445 | 443 | ||
444 | err: | ||
445 | clk->usecount--; | ||
446 | return ret; | 446 | return ret; |
447 | } | 447 | } |
448 | 448 | ||