From 1acef1689589dbb0afc1323739ba914b40b3fc41 Mon Sep 17 00:00:00 2001 From: Edward O'Callaghan Date: Fri, 19 Aug 2022 22:10:14 +1000 Subject: realtek_mst_i2c_spi.c: Avoid premature initialisation get_param()'s co-domain should either be well defined or error and return. By prematurely initialising we can obscure compiler warnings for unchecked error branches. Change-Id: I50bb6db24bb74c6b492d6a0fad9d9225dbb650ac Signed-off-by: Edward O'Callaghan Reviewed-on: https://review.coreboot.org/c/flashrom/+/66911 Tested-by: build bot (Jenkins) Reviewed-by: Angel Pons Reviewed-by: Felix Singer Reviewed-by: Peter Marheine Reviewed-by: Thomas Heijligen --- realtek_mst_i2c_spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'realtek_mst_i2c_spi.c') diff --git a/realtek_mst_i2c_spi.c b/realtek_mst_i2c_spi.c index 42ccc415..8d4f86d6 100644 --- a/realtek_mst_i2c_spi.c +++ b/realtek_mst_i2c_spi.c @@ -495,7 +495,7 @@ static int get_params(bool *reset, bool *enter_isp, bool *allow_brick) static int realtek_mst_i2c_spi_init(void) { int ret = 0; - bool reset = false, enter_isp = false, allow_brick = false; + bool reset, enter_isp, allow_brick; if (get_params(&reset, &enter_isp, &allow_brick)) return SPI_GENERIC_ERROR; -- cgit v1.2.1