mirror of
https://github.com/torvalds/linux.git
synced 2026-11-06 21:58:01 +01:00
rpmsg: mtk: release channel OF node on device teardown
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: 7017996951 ("rpmsg: add rpmsg support for mt8183 SCP.")
Signed-off-by: Avi Weiss <thnkslprpt@gmail.com>
Link: https://lore.kernel.org/r/20261013074744.942560-1-thnkslprpt@gmail.com
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
This commit is contained in:
parent
c39c2cdbde
commit
00e100cfbf
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user