Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/60205 )
Change subject: soc/amd/common/lpc/espi_util: simplify espi_get_general_configuration ......................................................................
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 --- M src/soc/amd/common/block/lpc/espi_util.c 1 file changed, 1 insertion(+), 2 deletions(-)
Approvals: build bot (Jenkins): Verified Marshall Dawson: Looks good to me, approved Raul Rangel: Looks good to me, approved
diff --git a/src/soc/amd/common/block/lpc/espi_util.c b/src/soc/amd/common/block/lpc/espi_util.c index 4eb700b..7261bb9 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_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);