diff mbox series

macintosh/windfarm_smu_sat: Add missing of_node_put()

Message ID 20230330033558.2562778-1-windhl@126.com (mailing list archive)
State Accepted
Commit 631cf002826007ab7415258ee647dcaf8845ad5a
Headers show
Series macintosh/windfarm_smu_sat: Add missing of_node_put() | expand

Checks

Context Check Description
snowpatch_ozlabs/github-powerpc_sparse success Successfully ran 4 jobs.
snowpatch_ozlabs/github-powerpc_kernel_qemu success Successfully ran 24 jobs.
snowpatch_ozlabs/github-powerpc_clang success Successfully ran 6 jobs.

Commit Message

Liang He March 30, 2023, 3:35 a.m. UTC
We call of_node_get() in wf_sat_probe() after sat is created,
so we need the of_node_put() before *kfree(sat)*.

Fixes: ac171c46667c ("[PATCH] powerpc: Thermal control for dual core G5s")
Signed-off-by: Liang He <windhl@126.com>
---
 drivers/macintosh/windfarm_smu_sat.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Michael Ellerman April 6, 2023, 1:09 a.m. UTC | #1
On Thu, 30 Mar 2023 11:35:58 +0800, Liang He wrote:
> We call of_node_get() in wf_sat_probe() after sat is created,
> so we need the of_node_put() before *kfree(sat)*.
> 
> 

Applied to powerpc/next.

[1/1] macintosh/windfarm_smu_sat: Add missing of_node_put()
      https://git.kernel.org/powerpc/c/631cf002826007ab7415258ee647dcaf8845ad5a

cheers
diff mbox series

Patch

diff --git a/drivers/macintosh/windfarm_smu_sat.c b/drivers/macintosh/windfarm_smu_sat.c
index ebc4256a9e4a..089f2743a070 100644
--- a/drivers/macintosh/windfarm_smu_sat.c
+++ b/drivers/macintosh/windfarm_smu_sat.c
@@ -171,6 +171,7 @@  static void wf_sat_release(struct kref *ref)
 
 	if (sat->nr >= 0)
 		sats[sat->nr] = NULL;
+	of_node_put(sat->node);
 	kfree(sat);
 }