diff options
author | Arthur Heymans <arthur@aheymans.xyz> | 2022-03-23 17:58:46 +0100 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2022-03-30 00:03:08 +0000 |
commit | 4a3331d93cc6296c1c5d966b8e914608b865819f (patch) | |
tree | c10b0f4549896a2ed07f3d947a8c2928229442eb | |
parent | f0d65213c03db84861ada042bf02359de4dea245 (diff) |
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>
-rw-r--r-- | src/device/pci_device.c | 2 |
1 files changed, 2 insertions, 0 deletions
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) { |