summaryrefslogtreecommitdiff
path: root/drivers/pci
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2026-07-22 16:18:27 -0500
committerBjorn Helgaas <bhelgaas@google.com>2026-07-22 16:18:27 -0500
commit5a134543e17ef1a68ab923a2823f4ed0876d29c0 (patch)
treee53e3ae5566c4fe3cbb70615778bf5260c987ff8 /drivers/pci
parentbfa2684123a5d40231bf196a1341990e991286a7 (diff)
parent3260336defeb292a91de29e4d1d93469e3cec663 (diff)
downloadlinux-next-5a134543e17ef1a68ab923a2823f4ed0876d29c0.tar.gz
linux-next-5a134543e17ef1a68ab923a2823f4ed0876d29c0.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')
-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);
}