Skip to content

Commit 0de5da1

Browse files
marcanjannau
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 <marcan@marcan.st>
1 parent 430d742 commit 0de5da1

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

drivers/pci/controller/pcie-apple.c

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

630+
/* In the success path, we keep a reference to np around */
631+
of_node_get(np);
632+
630633
ret = apple_pcie_port_register_irqs(port);
631634
WARN_ON(ret);
632635

0 commit comments

Comments
 (0)