Skip to content

Commit 7fa9fbf

Browse files
marcanMani-Sadhasivam
authored andcommitted
PCI: apple: Fix missing OF node reference in apple_pcie_setup_port
In the success path, we hang onto a reference to the node, so make sure to grab one. The caller iterator puts our borrowed reference when we return. Signed-off-by: Hector Martin <[email protected]> Signed-off-by: Alyssa Rosenzweig <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Signed-off-by: Manivannan Sadhasivam <[email protected]> Tested-by: Janne Grunau <[email protected]> Reviewed-by: Rob Herring (Arm) <[email protected]> Reviewed-by: Manivannan Sadhasivam <[email protected]> Acked-by: Alyssa Rosenzweig <[email protected]> Link: https://patch.msgid.link/[email protected]
1 parent 0411c90 commit 7fa9fbf

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/pci/controller/pcie-apple.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -593,6 +593,9 @@ static int apple_pcie_setup_port(struct apple_pcie *pcie,
593593
list_add_tail(&port->entry, &pcie->ports);
594594
init_completion(&pcie->event);
595595

596+
/* In the success path, we keep a reference to np around */
597+
of_node_get(np);
598+
596599
ret = apple_pcie_port_register_irqs(port);
597600
WARN_ON(ret);
598601

0 commit comments

Comments
 (0)