summaryrefslogtreecommitdiff
path: root/drivers/pci/controller
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2026-07-31 12:17:48 -0500
committerBjorn Helgaas <bhelgaas@google.com>2026-07-31 12:17:48 -0500
commiteb284df89f361637fdbe8d9a5375963334a9fe07 (patch)
tree5a212f7689fbb4250ee3c95a3d0323a49028e46e /drivers/pci/controller
parentd5c5bbdf4595666abf34e0bb499385bafa01f208 (diff)
parent3260336defeb292a91de29e4d1d93469e3cec663 (diff)
downloadlinux-next-eb284df89f361637fdbe8d9a5375963334a9fe07.tar.gz
linux-next-eb284df89f361637fdbe8d9a5375963334a9fe07.zip
Merge branch 'pci/controller/dwc-keystone'
- Fix OF node reference leak in init (Yuho Choi) * pci/controller/dwc-keystone: PCI: keystone: Fix OF node reference leak in init
Diffstat (limited to 'drivers/pci/controller')
-rw-r--r--drivers/pci/controller/dwc/pci-keystone.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/pci/controller/dwc/pci-keystone.c b/drivers/pci/controller/dwc/pci-keystone.c
index 278d2dba1db0..f1b27aed488d 100644
--- a/drivers/pci/controller/dwc/pci-keystone.c
+++ b/drivers/pci/controller/dwc/pci-keystone.c
@@ -1389,13 +1389,17 @@ static int ks_pcie_fault(unsigned long addr, unsigned int fsr,
static int __init ks_pcie_init(void)
{
+ struct device_node *np;
/*
* PCIe access errors that result into OCP errors are caught by ARM as
* "External aborts"
*/
- if (of_find_matching_node(NULL, ks_pcie_of_match))
+ np = of_find_matching_node(NULL, ks_pcie_of_match);
+ if (np) {
+ of_node_put(np);
hook_fault_code(17, ks_pcie_fault, SIGBUS, 0,
"Asynchronous external abort");
+ }
return platform_driver_register(&ks_pcie_driver);
}