* [PATCH] rpmsg: mtk: release channel OF node on device teardown
@ 2026-10-13 7:47 Avi Weiss
0 siblings, 0 replies; only message in thread
From: Avi Weiss @ 2026-10-13 7:47 UTC (permalink / raw)
To: Bjorn Andersson, Mathieu Poirier
Cc: Matthias Brugger, AngeloGioacchino Del Regno, Pi-Hsun Shih,
linux-remoteproc, linux-mediatek, linux-arm-kernel, linux-kernel,
Avi Weiss
mtk_rpmsg_match_device_subnode() returns a referenced OF child
node, which is stored in rpdev->dev.of_node.
mtk_rpmsg_release_device() later frees the containing allocation
without dropping that ref.
Release the OF node when the RPMsg device is destroyed.
Fixes: 7017996951fd ("rpmsg: add rpmsg support for mt8183 SCP.")
Signed-off-by: Avi Weiss <thnkslprpt@gmail.com>
---
drivers/rpmsg/mtk_rpmsg.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/rpmsg/mtk_rpmsg.c b/drivers/rpmsg/mtk_rpmsg.c
index 1b670ed54cfa2..430a9b2aa7bb9 100644
--- a/drivers/rpmsg/mtk_rpmsg.c
+++ b/drivers/rpmsg/mtk_rpmsg.c
@@ -168,6 +168,7 @@ static void mtk_rpmsg_release_device(struct device *dev)
struct rpmsg_device *rpdev = to_rpmsg_device(dev);
struct mtk_rpmsg_device *mdev = to_mtk_rpmsg_device(rpdev);
+ of_node_put(dev->of_node);
kfree(mdev);
}
base-commit: 24a19b953e2a3d0ea5a8c4951a0ab8f32720c907
--
2.43.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-13 7:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-13 7:47 [PATCH] rpmsg: mtk: release channel OF node on device teardown Avi Weiss
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®