diff options
| author | Paul Bolle <pebolle@tiscali.nl> | 2015-07-31 08:08:58 -0400 |
|---|---|---|
| committer | Michael Ellerman <mpe@ellerman.id.au> | 2015-08-06 01:10:20 -0400 |
| commit | fe2b592173ff0274e70dc44d1d28c19bb995aa7c (patch) | |
| tree | 0d7a28d7f54f80182e9a0e0636c350451c7ef072 | |
| parent | a825ac078b50266fb09168547752dd73c2fd4b4a (diff) | |
windfarm: decrement client count when unregistering
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>
| -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) | |||
| 435 | { | 435 | { |
| 436 | mutex_lock(&wf_lock); | 436 | mutex_lock(&wf_lock); |
| 437 | blocking_notifier_chain_unregister(&wf_client_list, nb); | 437 | blocking_notifier_chain_unregister(&wf_client_list, nb); |
| 438 | wf_client_count++; | 438 | wf_client_count--; |
| 439 | if (wf_client_count == 0) | 439 | if (wf_client_count == 0) |
| 440 | wf_stop_thread(); | 440 | wf_stop_thread(); |
| 441 | mutex_unlock(&wf_lock); | 441 | mutex_unlock(&wf_lock); |
