device/pci_device.c: Return if the scan parameter is invalid
Clang is unhappy about codepath of an invalid parameter because
variables remain unset.
Change-Id: I1ba392a48cf3f81a29d9645e5cf220b122d588af
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63038
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
diff --git a/src/device/pci_device.c b/src/device/pci_device.c
index 22ccf59..90b26c1 100644
--- a/src/device/pci_device.c
+++ b/src/device/pci_device.c
@@ -1518,6 +1518,8 @@
primary = parent->secondary;
secondary = link->secondary;
subordinate = link->subordinate;
+ } else {
+ return;
}
if (state == PCI_ROUTE_SCAN) {