Skip to content

Commit

Permalink
ARM: OMAP: Add sanity check to clk_disable
Browse files Browse the repository at this point in the history
BUG() if the clock use count is already zero.

Signed-off-by: Juha Yrjola <juha.yrjola@solidboot.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
  • Loading branch information
Juha Yrjola authored and Tony Lindgren committed Sep 25, 2006
1 parent bee7930 commit dee4564
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions arch/arm/plat-omap/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ void clk_disable(struct clk *clk)
return;

spin_lock_irqsave(&clockfw_lock, flags);
BUG_ON(clk->usecount == 0);
if (arch_clock->clk_disable)
arch_clock->clk_disable(clk);
spin_unlock_irqrestore(&clockfw_lock, flags);
Expand Down

0 comments on commit dee4564

Please sign in to comment.