From 4a334bc9a1ba9b38b048bebc7fefe77af5017151 Mon Sep 17 00:00:00 2001 From: Arthur Heymans Date: Tue, 3 Sep 2024 17:17:10 +0200 Subject: 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/84206 Reviewed-by: Marshall Dawson Reviewed-by: coreboot org Tested-by: build bot (Jenkins) --- src/mainboard/google/kahlee/variants/careena/variant.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/mainboard/google') 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) /* -- cgit v1.2.3