From ace1fea64eab79d98ead58eb795f3e448a8fc682 Mon Sep 17 00:00:00 2001 From: Aidan Garske Date: Tue, 8 Sep 2026 11:27:51 -0700 Subject: [PATCH] F-13459 - End the U-Boot SPI transaction after a failed header transfer --- hal/tpm_io_uboot.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hal/tpm_io_uboot.c b/hal/tpm_io_uboot.c index 56440261..898774d2 100644 --- a/hal/tpm_io_uboot.c +++ b/hal/tpm_io_uboot.c @@ -148,6 +148,10 @@ #ifdef DEBUG_WOLFTPM printf("wolfTPM: SPI header xfer failed: %d\n", ret); #endif + /* End the transaction so a driver that holds CS does not leave + * it active for the next request */ + spi_xfer(g_spi_slave, 0, NULL, NULL, SPI_XFER_END); + ret = TPM_RC_FAILURE; goto cleanup; }