mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-01 22:54:01 +00:00
powerpc/fsl_rio: Fix refcount leak in fsl_rio_setup
[ Upstream commitfcee96924b
] of_parse_phandle() returns a node pointer with refcount incremented, we should use of_node_put() on it when not need anymore. Add missing of_node_put() to avoid refcount leak. Fixes:abc3aeae3a
("fsl-rio: Add two ports and rapidio message units support") Signed-off-by: Miaoqian Lin <linmq006@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20220512123724.62931-1-linmq006@gmail.com Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
2631fe5b53
commit
bcb6c4c5eb
1 changed files with 2 additions and 0 deletions
|
@ -505,8 +505,10 @@ int fsl_rio_setup(struct platform_device *dev)
|
|||
if (rc) {
|
||||
dev_err(&dev->dev, "Can't get %pOF property 'reg'\n",
|
||||
rmu_node);
|
||||
of_node_put(rmu_node);
|
||||
goto err_rmu;
|
||||
}
|
||||
of_node_put(rmu_node);
|
||||
rmu_regs_win = ioremap(rmu_regs.start, resource_size(&rmu_regs));
|
||||
if (!rmu_regs_win) {
|
||||
dev_err(&dev->dev, "Unable to map rmu register window\n");
|
||||
|
|
Loading…
Reference in a new issue