Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/84206?usp=email )
Change subject: mb/google/kahlee/var/careena: Make sure bid isn't used uninitialized ......................................................................
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 --- M src/mainboard/google/kahlee/variants/careena/variant.c 1 file changed, 2 insertions(+), 1 deletion(-)
Approvals: coreboot org: Looks good to me, approved build bot (Jenkins): Verified Marshall Dawson: Looks good to me, approved
diff --git a/src/mainboard/google/kahlee/variants/careena/variant.c b/src/mainboard/google/kahlee/variants/careena/variant.c index 33ad260..5a393e2 100644 --- a/src/mainboard/google/kahlee/variants/careena/variant.c +++ b/src/mainboard/google/kahlee/variants/careena/variant.c @@ -38,7 +38,8 @@ } }
- google_chromeec_get_board_version(&bid); + if (google_chromeec_get_board_version(&bid)) + return;
if (bid == 7) /*