From: Juha Yrjola Date: Thu, 21 Sep 2006 15:29:26 +0000 (+0300) Subject: ARM: OMAP: Add sanity check to clk_disable X-Git-Tag: v2.6.18-omap1~55 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=ec07d4ec7ddbcfe32653d8e8b38ecea6c6570855;p=linux-2.6-omap-h63xx.git ARM: OMAP: Add sanity check to clk_disable BUG() if the clock use count is already zero. Signed-off-by: Juha Yrjola --- diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c index 79a82f89c06..73a2aec0f88 100644 --- a/arch/arm/plat-omap/clock.c +++ b/arch/arm/plat-omap/clock.c @@ -101,6 +101,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);