summaryrefslogtreecommitdiffstats
path: root/realtek_mst_i2c_spi.c
diff options
context:
space:
mode:
authorEdward O'Callaghan <quasisec@google.com>2022-08-19 22:10:14 +1000
committerThomas Heijligen <src@posteo.de>2022-08-25 18:59:17 +0000
commit1acef1689589dbb0afc1323739ba914b40b3fc41 (patch)
tree025fc2bc9784a5797407f5c927fb2720126a39b1 /realtek_mst_i2c_spi.c
parent907407830ed5597ea640012a2bc078c2c0d0d730 (diff)
downloadflashrom-1acef1689589dbb0afc1323739ba914b40b3fc41.tar.gz
flashrom-1acef1689589dbb0afc1323739ba914b40b3fc41.tar.bz2
flashrom-1acef1689589dbb0afc1323739ba914b40b3fc41.zip
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 <quasisec@google.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/66911 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Felix Singer <felixsinger@posteo.net> Reviewed-by: Peter Marheine <pmarheine@chromium.org> Reviewed-by: Thomas Heijligen <src@posteo.de>
Diffstat (limited to 'realtek_mst_i2c_spi.c')
-rw-r--r--realtek_mst_i2c_spi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/realtek_mst_i2c_spi.c b/realtek_mst_i2c_spi.c
index 42ccc415e..8d4f86d63 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;