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>
This commit is contained in:
Arthur Heymans 2022-03-23 17:58:46 +01:00 committed by Felix Held
parent f0d65213c0
commit 4a3331d93c
1 changed files with 2 additions and 0 deletions

View File

@ -1518,6 +1518,8 @@ static void pci_bridge_route(struct bus *link, scan_state state)
primary = parent->secondary; primary = parent->secondary;
secondary = link->secondary; secondary = link->secondary;
subordinate = link->subordinate; subordinate = link->subordinate;
} else {
return;
} }
if (state == PCI_ROUTE_SCAN) { if (state == PCI_ROUTE_SCAN) {