Commit fbf10b86 authored by Joe Hattori's avatar Joe Hattori Committed by Shawn Guo
Browse files

firmware: imx-scu: fix OF node leak in .probe()



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: f25a066d ("firmware: imx-scu: Support one TX and one RX")
Signed-off-by: default avatarJoe Hattori <joe@pf.is.s.u-tokyo.ac.jp>
Signed-off-by: default avatarShawn Guo <shawnguo@kernel.org>
parent 2014c95a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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++) {