ARM: OMAP: Add sanity check to clk_disable
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>
This commit is contained in:
committed by
Tony Lindgren
parent
bee7930f4a
commit
dee45648a5
@@ -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);
|
||||||
|
Reference in New Issue
Block a user