pci: apple: Fix use of uninitialized variable
authorMark Kettenis <kettenis@openbsd.org>
Sat, 23 Aug 2025 14:03:56 +0000 (16:03 +0200)
committerTom Rini <trini@konsulko.com>
Tue, 9 Sep 2025 17:04:16 +0000 (11:04 -0600)
commita5b483a52a5561030ab3e50923a215fbed49d006
tree0b37b8313c42fb72022362d06131af362e5df56b
parentae84ef8c625f6454747b5d13192e1a16649761b2
pci: apple: Fix use of uninitialized variable

Replace use of uninitialized variable with the PCI device number
in an error message as this is what we use elsewhere to derive
the PCIe port number.  Use ofnode_read_pci_addr() to read the
PCI address of the node and derive the device number from that.

Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
Reported-by: Andrew Goodbody <andrew.goodbody@linaro.org>
drivers/pci/pcie_apple.c