Skip to content

Commit

Permalink
windfarm: decrement client count when unregistering
Browse files Browse the repository at this point in the history
wf_unregister_client() increments the client count when a client
unregisters. That is obviously incorrect. Decrement that client count
instead.

Fixes: 75722d3 ("[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>
  • Loading branch information
Paul Bolle authored and Michael Ellerman committed Aug 6, 2015
1 parent a825ac0 commit fe2b592
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/macintosh/windfarm_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit fe2b592

Please sign in to comment.