Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fe2b5921 authored by Paul Bolle's avatar Paul Bolle Committed by Michael Ellerman
Browse files

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: 75722d39 ("[PATCH] ppc64: Thermal control for SMU based machines")

Signed-off-by: default avatarPaul Bolle <pebolle@tiscali.nl>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent a825ac07
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -435,7 +435,7 @@ int wf_unregister_client(struct notifier_block *nb)
{
{
	mutex_lock(&wf_lock);
	mutex_lock(&wf_lock);
	blocking_notifier_chain_unregister(&wf_client_list, nb);
	blocking_notifier_chain_unregister(&wf_client_list, nb);
	wf_client_count++;
	wf_client_count--;
	if (wf_client_count == 0)
	if (wf_client_count == 0)
		wf_stop_thread();
		wf_stop_thread();
	mutex_unlock(&wf_lock);
	mutex_unlock(&wf_lock);