From f36b0138c4c38bcffcb2cf6fae82fbfbeabf035b Mon Sep 17 00:00:00 2001 From: Fred Reitberger Date: Wed, 29 Jun 2022 13:54:57 -0400 Subject: util/amdfwtool: Initalize all variables before use Not all of the fields of the amd_cb_config structure were properly initialized. Rather than initialize each field individually, initialize the entire structure to 0. TEST: Boot chausie Signed-off-by: Fred Reitberger Change-Id: Ia343f01bce3956d66d01ce485b43963193c9df31 Reviewed-on: https://review.coreboot.org/c/coreboot/+/65533 Tested-by: build bot (Jenkins) Reviewed-by: Felix Held Reviewed-by: Raul Rangel Reviewed-by: Karthik Ramasubramanian --- util/amdfwtool/amdfwtool.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'util/amdfwtool') diff --git a/util/amdfwtool/amdfwtool.c b/util/amdfwtool/amdfwtool.c index abc0a9eb9d..a4d71a556a 100644 --- a/util/amdfwtool/amdfwtool.c +++ b/util/amdfwtool/amdfwtool.c @@ -1522,21 +1522,10 @@ int main(int argc, char **argv) uint8_t efs_spi_speed = 0xff; uint8_t efs_spi_micron_flag = 0xff; - amd_cb_config cb_config; + amd_cb_config cb_config = { 0 }; int debug = 0; int list_deps = 0; - cb_config.have_whitelist = false; - cb_config.unlock_secure = false; - cb_config.use_secureos = false; - cb_config.load_mp2_fw = false; - cb_config.s0i3 = false; - cb_config.multi_level = false; - cb_config.recovery_ab = false; - cb_config.need_ish = false; - cb_config.recovery_ab_single_copy = false; - cb_config.use_combo = false; - while (1) { int optindex = 0; -- cgit v1.2.3