Skip to content

Commit 2ba2e8c

Browse files
outman119gregkh
authored andcommitted
pmdomain: imx: scu-pd: Fix device_node reference leak during ->probe()
[ Upstream commit c8e9b6a ] 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: 893cfb9 ("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> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 2d9cb1f commit 2ba2e8c

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/pmdomain/imx/scu-pd.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,7 @@ static void imx_sc_pd_get_console_rsrc(void)
326326
return;
327327

328328
imx_con_rsrc = specs.args[0];
329+
of_node_put(specs.np);
329330
}
330331

331332
static int imx_sc_get_pd_power(struct device *dev, u32 rsrc)

0 commit comments

Comments
 (0)