diff options
author | Felix Held <felix-coreboot@felixheld.de> | 2021-12-18 00:41:23 +0100 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2021-12-20 17:39:46 +0000 |
commit | d992aa6111fcb7bd023377d90692b74a99cfa732 (patch) | |
tree | 99f11d0365b295eb5b1fe1a03d251b19b92a200b /src/soc/amd/common/block | |
parent | bad64c8b9b8ac4f5b17486ef735731be95a531a4 (diff) |
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>
Diffstat (limited to 'src/soc/amd/common/block')
-rw-r--r-- | src/soc/amd/common/block/lpc/espi_util.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/soc/amd/common/block/lpc/espi_util.c b/src/soc/amd/common/block/lpc/espi_util.c index 4eb700be19..7261bb962f 100644 --- a/src/soc/amd/common/block/lpc/espi_util.c +++ b/src/soc/amd/common/block/lpc/espi_util.c @@ -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) { - int ret = espi_get_configuration(ESPI_SLAVE_GENERAL_CFG, config); - if (ret == -1) + if (espi_get_configuration(ESPI_SLAVE_GENERAL_CFG, config) == -1) return -1; espi_show_slave_general_configuration(*config); |