diff options
author | Felix Held <felix-coreboot@felixheld.de> | 2021-12-18 00:41:23 +0100 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2022-01-07 13:20:00 +0000 |
commit | 5ba87a80921cc0ef3f164d30ef27d35244131a52 (patch) | |
tree | 618fce3249908eb2c00ada98da3ede2afb382070 /src/include/spd_cache.h | |
parent | e2192e6a82e37cb40216c98dfd0183dc146eac37 (diff) |
soc/amd/common/lpc/espi_util: handle espi_get_configuration error
In espi_wait_channel_ready the return value of espi_get_configuration
didn't get checked before. In the case of the espi_send_command call in
espi_get_configuration returning CB_ERR, espi_get_configuration didn't
write to the local config variable, so if this happens in the first pass
of the do-while loop, the following espi_slave_is_channel_ready call
would use the uninitialized local config variable as parameter. Fix this
by checking the return value of espi_get_configuration.
TEST=None
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Iff1a0670e17b9d6c6f4daf2ea56badf6c428b8c9
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60209
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Diffstat (limited to 'src/include/spd_cache.h')
0 files changed, 0 insertions, 0 deletions