diff options
| author | Zhang Zekun <zhangzekun11@huawei.com> | 2024-10-24 11:04:41 +0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-12-09 10:31:56 +0100 |
| commit | 872bfc20abea144c144d006ff16bafdf39d8197d (patch) | |
| tree | b81250cd6f1e3f1de51c3ffbe4f93eb7e65aa7b3 /drivers/pmdomain | |
| parent | 1103d3b5a5025aba1ea1fcee287c8858b175bec4 (diff) | |
| download | linux-872bfc20abea144c144d006ff16bafdf39d8197d.tar.gz linux-872bfc20abea144c144d006ff16bafdf39d8197d.tar.bz2 linux-872bfc20abea144c144d006ff16bafdf39d8197d.zip | |
pmdomain: ti-sci: Add missing of_node_put() for args.np
[ Upstream commit afc2331ef81657493c074592c409dac7c3cb8ccc ]
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: efa5c01cd7ee ("soc: ti: ti_sci_pm_domains: switch to use multiple genpds instead of one")
Signed-off-by: Zhang Zekun <zhangzekun11@huawei.com>
Reviewed-by: Dhruva Gole <d-gole@ti.com>
Message-ID: <20241024030442.119506-2-zhangzekun11@huawei.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/pmdomain')
| -rw-r--r-- | drivers/pmdomain/ti/ti_sci_pm_domains.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/pmdomain/ti/ti_sci_pm_domains.c b/drivers/pmdomain/ti/ti_sci_pm_domains.c index f520228e1b6a..4449d36042c2 100644 --- a/drivers/pmdomain/ti/ti_sci_pm_domains.c +++ b/drivers/pmdomain/ti/ti_sci_pm_domains.c @@ -161,6 +161,7 @@ static int ti_sci_pm_domain_probe(struct platform_device *pdev) break; if (args.args_count >= 1 && args.np == dev->of_node) { + of_node_put(args.np); if (args.args[0] > max_id) { max_id = args.args[0]; } else { @@ -188,7 +189,10 @@ static int ti_sci_pm_domain_probe(struct platform_device *pdev) pm_genpd_init(&pd->pd, NULL, true); list_add(&pd->node, &pd_provider->pd_list); + } else { + of_node_put(args.np); } + index++; } } |
