Commit dee45648 authored by Juha Yrjola's avatar Juha Yrjola Committed by Tony Lindgren

ARM: OMAP: Add sanity check to clk_disable

BUG() if the clock use count is already zero.
Signed-off-by: default avatarJuha Yrjola <juha.yrjola@solidboot.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent bee7930f
...@@ -100,6 +100,7 @@ void clk_disable(struct clk *clk) ...@@ -100,6 +100,7 @@ void clk_disable(struct clk *clk)
return; return;
spin_lock_irqsave(&clockfw_lock, flags); spin_lock_irqsave(&clockfw_lock, flags);
BUG_ON(clk->usecount == 0);
if (arch_clock->clk_disable) if (arch_clock->clk_disable)
arch_clock->clk_disable(clk); arch_clock->clk_disable(clk);
spin_unlock_irqrestore(&clockfw_lock, flags); spin_unlock_irqrestore(&clockfw_lock, flags);
......
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