summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShiyu Sun <sshiyu@google.com>2021-01-21 16:31:32 +1100
committerEdward O'Callaghan <quasisec@chromium.org>2021-01-28 12:50:41 +0000
commit5905270fc7a8b0b59dbff8f6832c8b42604e04ed (patch)
tree4f4bfc72280f9d70ad439d3aa510418931c06420
parentdfded999cd3b1b1032d1f1a1441e26c9573f60a4 (diff)
downloadflashrom-5905270fc7a8b0b59dbff8f6832c8b42604e04ed.tar.gz
flashrom-5905270fc7a8b0b59dbff8f6832c8b42604e04ed.tar.bz2
flashrom-5905270fc7a8b0b59dbff8f6832c8b42604e04ed.zip
realtek_mst_i2c_spi.c: Skip return value check for reset function
The return value for reset function can not be guaranteed when reset success. There is no way to check if reset success or not. BUG=b:147402710,b:152558985 BRANCH=none TEST=builds Signed-off-by: Shiyu Sun <sshiyu@chromium.org> Change-Id: Ia6200f7150db4368c26d8dfe779a9e85184b1b06 Reviewed-on: https://review.coreboot.org/c/flashrom/+/49786 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
-rw-r--r--realtek_mst_i2c_spi.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/realtek_mst_i2c_spi.c b/realtek_mst_i2c_spi.c
index 3dd1b3666..1bbb71f42 100644
--- a/realtek_mst_i2c_spi.c
+++ b/realtek_mst_i2c_spi.c
@@ -433,9 +433,13 @@ static int realtek_mst_i2c_spi_shutdown(void *data)
(struct realtek_mst_i2c_spi_data *)data;
int fd = realtek_mst_data->fd;
if (realtek_mst_data->reset) {
- ret |= realtek_mst_i2c_spi_reset_mpu(fd);
- if (ret != 0)
- msg_perr("%s: MCU failed to reset on tear-down.\n", __func__);
+ /*
+ * Return value for reset mpu is not checked since
+ * the return value is not guaranteed to be 0 on a
+ * success reset. Currently there is no way to fix
+ * that. For more details see b:147402710.
+ */
+ realtek_mst_i2c_spi_reset_mpu(fd);
}
i2c_close(fd);
free(data);