Skip to contentSkip to conversation

spi: fsi: Fix transfer returning without finalizing message

PATCH New Eddie James 1 participant 1 message Nov 10, 2020

Subsystems (2)
lore
Share & tools
lore

Eddie James

author maintainer
#0 lore raw

PATCH 1/1 spi: fsi: Fix transfer returning without finalizing message

In the case that the SPI mux isn't set, the transfer_one_message function returns without finalizing the message. This means that the transfer never completes, resulting in hung tasks and an eventual kernel panic. Fix it by finalizing the transfer in this case.

Fixes 389874ec96e2 ("spi: fsi: Check mux status before transfers")
---
 drivers/spi/spi-fsi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/spi/spi-fsi.c +1 -1
index fec8f479687f..56b96bc16b7f 100644
@@ -477,7 +477,7 @@ static int fsi_spi_transfer_one_message(struct spi_controller *ctlr,
 
 	rc = fsi_spi_check_mux(ctx->fsi, ctx->dev);
 	if (rc)
-		return rc;
+		goto error;
 
 	list_for_each_entry(transfer, &mesg->transfers, transfer_list) {
 		struct fsi_spi_sequence seq;
Signature · 1 line
2.26.2