summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/soc/amd/common/block/spi/fch_spi_ctrl.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/soc/amd/common/block/spi/fch_spi_ctrl.c b/src/soc/amd/common/block/spi/fch_spi_ctrl.c
index aad8de7f69..33e1139d69 100644
--- a/src/soc/amd/common/block/spi/fch_spi_ctrl.c
+++ b/src/soc/amd/common/block/spi/fch_spi_ctrl.c
@@ -97,9 +97,10 @@ static int execute_command(void)
spi_write8(SPI_CMD_TRIGGER, SPI_CMD_TRIGGER_EXECUTE);
- if (wait_for_ready())
- printk(BIOS_ERR,
- "FCH_SC Error: Timeout executing command\n");
+ if (wait_for_ready()) {
+ printk(BIOS_ERR, "FCH_SC Error: Timeout executing command\n");
+ return -1;
+ }
dump_state(SPI_DUMP_STATE_AFTER_CMD);