提交 fe2b5921 编写于 作者: P Paul Bolle 提交者: Michael Ellerman

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: NPaul Bolle <pebolle@tiscali.nl>
Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
上级 a825ac07
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册