Skip to content

Commit afc2331

Browse files
Zhang Zekunstorulf
authored andcommitted
pmdomain: ti-sci: Add missing of_node_put() for args.np
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]>
1 parent cc8eeff commit afc2331

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/pmdomain/ti/ti_sci_pm_domains.c

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

163163
if (args.args_count >= 1 && args.np == dev->of_node) {
164+
of_node_put(args.np);
164165
if (args.args[0] > max_id) {
165166
max_id = args.args[0];
166167
} else {
@@ -193,7 +194,10 @@ static int ti_sci_pm_domain_probe(struct platform_device *pdev)
193194
pm_genpd_init(&pd->pd, NULL, true);
194195

195196
list_add(&pd->node, &pd_provider->pd_list);
197+
} else {
198+
of_node_put(args.np);
196199
}
200+
197201
index++;
198202
}
199203
}

0 commit comments

Comments
 (0)