Skip to content

Commit 13a5451

Browse files
Zhang Zekunmehmetb0
authored andcommitted
pmdomain: ti-sci: Add missing of_node_put() for args.np
BugLink: https://bugs.launchpad.net/bugs/2095283 [ Upstream commit afc2331 ] of_parse_phandle_with_args() needs to call of_node_put() to decrement the refcount of args.np. So, Add the missing of_node_put() in the loop. Fixes: efa5c01 ("soc: ti: ti_sci_pm_domains: switch to use multiple genpds instead of one") Signed-off-by: Zhang Zekun <[email protected]> Reviewed-by: Dhruva Gole <[email protected]> Message-ID: <[email protected]> Signed-off-by: Ulf Hansson <[email protected]> Signed-off-by: Sasha Levin <[email protected]> Signed-off-by: Koichiro Den <[email protected]>
1 parent d827ed4 commit 13a5451

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/soc/ti/ti_sci_pm_domains.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ static int ti_sci_pm_domain_probe(struct platform_device *pdev)
165165
break;
166166

167167
if (args.args_count >= 1 && args.np == dev->of_node) {
168+
of_node_put(args.np);
168169
if (args.args[0] > max_id) {
169170
max_id = args.args[0];
170171
} else {
@@ -192,7 +193,10 @@ static int ti_sci_pm_domain_probe(struct platform_device *pdev)
192193
pm_genpd_init(&pd->pd, NULL, true);
193194

194195
list_add(&pd->node, &pd_provider->pd_list);
196+
} else {
197+
of_node_put(args.np);
195198
}
199+
196200
index++;
197201
}
198202
}

0 commit comments

Comments
 (0)