aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/sysdev/fsl_msi.c
diff options
context:
space:
mode:
authorLiang He <[email protected]>2022-07-04 14:52:33 +0000
committerMichael Ellerman <[email protected]>2022-09-05 07:30:18 +0000
commitdef435c04ee984a5f9ed2711b2bfe946936c6a21 (patch)
tree09094a4f70edb6a31467dd6ec7e31a776231c597 /arch/powerpc/sysdev/fsl_msi.c
parentpowerpc/sysdev: Add missing of_node_put()s (diff)
downloadkernel-def435c04ee984a5f9ed2711b2bfe946936c6a21.tar.gz
kernel-def435c04ee984a5f9ed2711b2bfe946936c6a21.zip
powerpc/sysdev/fsl_msi: Add missing of_node_put()
In fsl_setup_msi_irqs(), use of_node_put() to drop the reference returned by of_parse_phandle(). Fixes: 895d603f945ba ("powerpc/fsl_msi: add support for the fsl, msi property in PCI nodes") Co-authored-by: Miaoqian Lin <[email protected]> Signed-off-by: Liang He <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'arch/powerpc/sysdev/fsl_msi.c')
-rw-r--r--arch/powerpc/sysdev/fsl_msi.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/sysdev/fsl_msi.c b/arch/powerpc/sysdev/fsl_msi.c
index ef9a5999fa93..73c2d70706c0 100644
--- a/arch/powerpc/sysdev/fsl_msi.c
+++ b/arch/powerpc/sysdev/fsl_msi.c
@@ -209,8 +209,10 @@ static int fsl_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
dev_err(&pdev->dev,
"node %pOF has an invalid fsl,msi phandle %u\n",
hose->dn, np->phandle);
+ of_node_put(np);
return -EINVAL;
}
+ of_node_put(np);
}
msi_for_each_desc(entry, &pdev->dev, MSI_DESC_NOTASSOCIATED) {