Skip to content

Commit 4b24976

Browse files
joehattoriSasha Levin
authored andcommitted
firmware: imx-scu: fix OF node leak in .probe()
[ Upstream commit fbf10b8 ] 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: f25a066 ("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>
1 parent 01f858b commit 4b24976

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/firmware/imx/imx-scu.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,7 @@ static int imx_scu_probe(struct platform_device *pdev)
279279
return ret;
280280

281281
sc_ipc->fast_ipc = of_device_is_compatible(args.np, "fsl,imx8-mu-scu");
282+
of_node_put(args.np);
282283

283284
num_channel = sc_ipc->fast_ipc ? 2 : SCU_MU_CHAN_NUM;
284285
for (i = 0; i < num_channel; i++) {

0 commit comments

Comments
 (0)