soc/amd/common/lpc/espi_util: simplify espi_get_general_configuration

The intermediate ret variable isn't needed.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I4e6747cf468c5ba8da6c1a3b20022851e32ad951
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60205
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
This commit is contained in:
Felix Held 2021-12-18 00:41:23 +01:00
parent bad64c8b9b
commit d992aa6111
1 changed files with 1 additions and 2 deletions

View File

@ -639,8 +639,7 @@ static int espi_set_configuration(uint16_t slave_reg_addr, uint32_t config)
static int espi_get_general_configuration(uint32_t *config) static int espi_get_general_configuration(uint32_t *config)
{ {
int ret = espi_get_configuration(ESPI_SLAVE_GENERAL_CFG, config); if (espi_get_configuration(ESPI_SLAVE_GENERAL_CFG, config) == -1)
if (ret == -1)
return -1; return -1;
espi_show_slave_general_configuration(*config); espi_show_slave_general_configuration(*config);