All of lore.kernel.org
 help / color / mirror / Atom feed
From: Liang He <windhl@126.com>
To: benh@kernel.crashing.org, u.kleine-koenig@pengutronix.de,
	mpe@ellerman.id.au, benjamin.mugnier@foss.st.com,
	cminyard@mvista.com, khalasa@piap.pl,
	linuxppc-dev@lists.ozlabs.org, windhl@126.com
Subject: [PATCH] macintosh/windfarm_smu_sat: Add missing of_node_put()
Date: Thu, 30 Mar 2023 11:35:58 +0800	[thread overview]
Message-ID: <20230330033558.2562778-1-windhl@126.com> (raw)

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(+)

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);
 }
 
-- 
2.25.1


             reply	other threads:[~2023-03-30  3:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-30  3:35 Liang He [this message]
2023-04-06  1:09 ` [PATCH] macintosh/windfarm_smu_sat: Add missing of_node_put() Michael Ellerman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230330033558.2562778-1-windhl@126.com \
    --to=windhl@126.com \
    --cc=benh@kernel.crashing.org \
    --cc=benjamin.mugnier@foss.st.com \
    --cc=cminyard@mvista.com \
    --cc=khalasa@piap.pl \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=u.kleine-koenig@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.