mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [BUGFIX][PATCH] Fix double inversion bug in clk_disable()
@ 2011-08-02 11:26 Lothar Waßmann
  0 siblings, 0 replies; only message in thread
From: Lothar Waßmann @ 2011-08-02 11:26 UTC (permalink / raw)
  To: linux-kernel; +Cc: Jeremy Kerr, linux-arm-kernel, Lothar Waßmann

The condition check for calling the low level disable function is
wrong due to double inversion via '!' and '== 0'.

Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
---
 drivers/clk/clk.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 83c6b67..1525e2a 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -81,7 +81,7 @@ void clk_disable(struct clk *clk)
 
 	WARN_ON(clk->enable_count == 0);
 
-	if (!--clk->enable_count == 0 && clk->ops->disable)
+	if (--clk->enable_count == 0 && clk->ops->disable)
 		clk->ops->disable(clk);
 
 	spin_unlock_irqrestore(&clk->enable_lock, flags);
-- 
1.5.6.5


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-08-02 11:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-02 11:26 [BUGFIX][PATCH] Fix double inversion bug in clk_disable() Lothar Waßmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®