summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Bolle <pebolle@tiscali.nl>2015-07-31 14:08:58 +0200
committerWilly Tarreau <w@1wt.eu>2015-12-06 00:49:07 +0100
commit315daa81f50476eae4e875bfe0e5113bd8f20a3a (patch)
tree98e429dc32f0db2fad06dccd1995c4c807af51cd
parent9bc0d0094ad62c1b6f957e1e148c08f3df3adc81 (diff)
windfarm: decrement client count when unregistering
commit fe2b592173ff0274e70dc44d1d28c19bb995aa7c upstream. wf_unregister_client() increments the client count when a client unregisters. That is obviously incorrect. Decrement that client count instead. Fixes: 75722d3992f5 ("[PATCH] ppc64: Thermal control for SMU based machines") Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Ben Hutchings <ben@decadent.org.uk> (cherry picked from commit 48c46d4aed1c27f363e4673e988212340e82e1bb) Signed-off-by: Willy Tarreau <w@1wt.eu>
-rw-r--r--drivers/macintosh/windfarm_core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/macintosh/windfarm_core.c b/drivers/macintosh/windfarm_core.c
index 075b4d99e354..553414e64449 100644
--- a/drivers/macintosh/windfarm_core.c
+++ b/drivers/macintosh/windfarm_core.c
@@ -418,7 +418,7 @@ int wf_unregister_client(struct notifier_block *nb)
{
mutex_lock(&wf_lock);
blocking_notifier_chain_unregister(&wf_client_list, nb);
- wf_client_count++;
+ wf_client_count--;
if (wf_client_count == 0)
wf_stop_thread();
mutex_unlock(&wf_lock);