diff options
author | Paul Bolle <pebolle@tiscali.nl> | 2015-07-31 14:08:58 +0200 |
---|---|---|
committer | Jiri Slaby <jslaby@suse.cz> | 2015-10-27 10:18:23 +0100 |
commit | dc523d46c686be6d40ad060ef91e08e484bee401 (patch) | |
tree | 8651f64bf006c499b91de6abd075724cb51e9cb8 | |
parent | d64f7e36ba003ea29e5f7abdde640145bd9be386 (diff) | |
download | lwn-dc523d46c686be6d40ad060ef91e08e484bee401.tar.gz lwn-dc523d46c686be6d40ad060ef91e08e484bee401.zip |
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: Jiri Slaby <jslaby@suse.cz>
-rw-r--r-- | drivers/macintosh/windfarm_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/macintosh/windfarm_core.c b/drivers/macintosh/windfarm_core.c index 3ee198b65843..cc7ece1712b5 100644 --- a/drivers/macintosh/windfarm_core.c +++ b/drivers/macintosh/windfarm_core.c @@ -435,7 +435,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); |