Skip to content

Commit fe19fd7

Browse files
Felix Gugregkh
authored andcommitted
pmdomain: ti: omap_prm: Fix a reference leak on device node
[ Upstream commit 44c28e1 ] When calling of_parse_phandle_with_args(), the caller is responsible to call of_node_put() to release the reference of device node. In omap_prm_domain_attach_dev, it does not release the reference. Fixes: 58cbff0 ("soc: ti: omap-prm: Add basic power domain support") Signed-off-by: Felix Gu <gu_0233@qq.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 294b557 commit fe19fd7

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/pmdomain/ti/omap_prm.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -651,6 +651,7 @@ static int omap_prm_domain_attach_dev(struct generic_pm_domain *domain,
651651
if (pd_args.args_count != 0)
652652
dev_warn(dev, "%s: unusupported #power-domain-cells: %i\n",
653653
prmd->pd.name, pd_args.args_count);
654+
of_node_put(pd_args.np);
654655

655656
genpd_data = dev_gpd_data(dev);
656657
genpd_data->data = NULL;

0 commit comments

Comments
 (0)