From 4a3331d93cc6296c1c5d966b8e914608b865819f Mon Sep 17 00:00:00 2001 From: Arthur Heymans Date: Wed, 23 Mar 2022 17:58:46 +0100 Subject: [PATCH] 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/63038 Tested-by: build bot (Jenkins) Reviewed-by: Angel Pons --- src/device/pci_device.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/device/pci_device.c b/src/device/pci_device.c index 22ccf59338..90b26c129b 100644 --- a/src/device/pci_device.c +++ b/src/device/pci_device.c @@ -1518,6 +1518,8 @@ static void pci_bridge_route(struct bus *link, scan_state state) primary = parent->secondary; secondary = link->secondary; subordinate = link->subordinate; + } else { + return; } if (state == PCI_ROUTE_SCAN) {