mirror of
https://review.coreboot.org/flashrom.git
synced 2025-07-01 22:21:16 +02:00
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>
This commit is contained in:

committed by
Thomas Heijligen

parent
907407830e
commit
1acef16895
@ -495,7 +495,7 @@ static int get_params(bool *reset, bool *enter_isp, bool *allow_brick)
|
|||||||
static int realtek_mst_i2c_spi_init(void)
|
static int realtek_mst_i2c_spi_init(void)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
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))
|
if (get_params(&reset, &enter_isp, &allow_brick))
|
||||||
return SPI_GENERIC_ERROR;
|
return SPI_GENERIC_ERROR;
|
||||||
|
Reference in New Issue
Block a user