summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Hattori <joe@pf.is.s.u-tokyo.ac.jp>2024-12-24 12:34:56 +0900
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-03-28 21:59:52 +0100
commit555f05de6f46b4b9ac9a14f81cdf176ea1b8a0bf (patch)
tree10d41cdb8f4e5035de25ccfe7b2a10a09869fc41
parent4b6a8fa777d29785c7ddb51dcbb2b5411deefaca (diff)
downloadlinux-555f05de6f46b4b9ac9a14f81cdf176ea1b8a0bf.tar.gz
linux-555f05de6f46b4b9ac9a14f81cdf176ea1b8a0bf.tar.bz2
linux-555f05de6f46b4b9ac9a14f81cdf176ea1b8a0bf.zip
firmware: imx-scu: fix OF node leak in .probe()
[ Upstream commit fbf10b86f6057cf79300720da4ea4b77e6708b0d ] imx_scu_probe() calls of_parse_phandle_with_args(), but does not release the OF node reference obtained by it. Add a of_node_put() call after done with the node. Fixes: f25a066d1a07 ("firmware: imx-scu: Support one TX and one RX") Signed-off-by: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp> Signed-off-by: Shawn Guo <shawnguo@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--drivers/firmware/imx/imx-scu.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/firmware/imx/imx-scu.c b/drivers/firmware/imx/imx-scu.c
index 1dd4362ef9a3..8c28e25ddc8a 100644
--- a/drivers/firmware/imx/imx-scu.c
+++ b/drivers/firmware/imx/imx-scu.c
@@ -280,6 +280,7 @@ static int imx_scu_probe(struct platform_device *pdev)
return ret;
sc_ipc->fast_ipc = of_device_is_compatible(args.np, "fsl,imx8-mu-scu");
+ of_node_put(args.np);
num_channel = sc_ipc->fast_ipc ? 2 : SCU_MU_CHAN_NUM;
for (i = 0; i < num_channel; i++) {