summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2024-09-03 17:17:10 +0200
committerFelix Held <felix-coreboot@felixheld.de>2024-09-30 11:12:42 +0000
commit4a334bc9a1ba9b38b048bebc7fefe77af5017151 (patch)
treedfaa3d6e2cb6ff2cc38c94bf2c90322932a4ba75
parent544fb8c296dd1a7d42e8795aa7f7479c0fd67b35 (diff)
mb/google/kahlee/var/careena: Make sure bid isn't used uninitialized
GCC with LTO cought this. Warning: src/mainboard/google/kahlee/variants/careena/variant.c:44:12: error: 'bid' may be used uninitialized [-Werror=maybe-uninitialized] 44 | if (bid == 7) | ^ src/mainboard/google/kahlee/variants/careena/variant.c: In function 'car_stage_entry': src/mainboard/google/kahlee/variants/careena/variant.c:24:18: note: 'bid' was declared here 24 | uint32_t bid; Change-Id: Ie732b5be5cd9dc0abaf1a5efe023bcb0738dba1d Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/84206 Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com> Reviewed-by: coreboot org <coreboot.org@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
-rw-r--r--src/mainboard/google/kahlee/variants/careena/variant.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mainboard/google/kahlee/variants/careena/variant.c b/src/mainboard/google/kahlee/variants/careena/variant.c
index 33ad260e74..5a393e252d 100644
--- a/src/mainboard/google/kahlee/variants/careena/variant.c
+++ b/src/mainboard/google/kahlee/variants/careena/variant.c
@@ -38,7 +38,8 @@ void variant_romstage_entry(void)
}
}
- google_chromeec_get_board_version(&bid);
+ if (google_chromeec_get_board_version(&bid))
+ return;
if (bid == 7)
/*