]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
pmdomain: imx: scu-pd: Fix device_node reference leak during ->probe()
authorFelix Gu <ustc.gu@gmail.com>
Wed, 21 Jan 2026 14:17:17 +0000 (22:17 +0800)
committerUlf Hansson <ulf.hansson@linaro.org>
Wed, 1 Apr 2026 11:07:31 +0000 (13:07 +0200)
When calling of_parse_phandle_with_args(), the caller is responsible
to call of_node_put() to release the reference of device node.
In imx_sc_pd_get_console_rsrc(), it does not release the reference.

Fixes: 893cfb99734f ("firmware: imx: scu-pd: do not power off console domain")
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/pmdomain/imx/scu-pd.c

index 01d465d88f60dcbf3d20335d364077996f405b4a..3ec33667a308c327baf44bf3b8d7d95b25d8096d 100644 (file)
@@ -326,6 +326,7 @@ static void imx_sc_pd_get_console_rsrc(void)
                return;
 
        imx_con_rsrc = specs.args[0];
+       of_node_put(specs.np);
 }
 
 static int imx_sc_get_pd_power(struct device *dev, u32 rsrc)