From: Juha Yrjola Date: Mon, 25 Sep 2006 09:41:47 +0000 (+0300) Subject: ARM: OMAP: Add sanity check to clk_disable X-Git-Tag: v2.6.19-rc1~885^2~18^2~6 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dee45648a5e2f3075c51f5d6b5da65b32235d3f9;p=linux-2.6 ARM: OMAP: Add sanity check to clk_disable BUG() if the clock use count is already zero. Signed-off-by: Juha Yrjola Signed-off-by: Tony Lindgren --- diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c index 7f45c7c3e6..4abf2714f2 100644 --- a/arch/arm/plat-omap/clock.c +++ b/arch/arm/plat-omap/clock.c @@ -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);