Skip to contentSkip to conversation

macintosh/windfarm_smu_sat: Add missing of_node_put()

PATCH Applied Liang He 2 participants 2 messages Mar 30, 2023 – Apr 6, 2023 Linux for power macintosh

lore
Share & tools
lore

Liang He

author
#0 lore raw

PATCH 1/1 macintosh/windfarm_smu_sat: Add missing of_node_put()

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")
---
 drivers/macintosh/windfarm_smu_sat.c | 1 +
 1 file changed, 1 insertion(+)
drivers/macintosh/windfarm_smu_sat.c +1 -0
index ebc4256a9e4a..089f2743a070 100644
@@ -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);
 }
 
Signature · 1 line
2.25.1