Reported-by: Andy Shevchenko <andy.shevchenko@xxxxxxxxx> Signed-off-by: David Jander <david@xxxxxxxxxxx> --- drivers/spi/spi.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 09d4959bc09c..dc1a324e3271 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -1636,13 +1636,13 @@ static int __spi_pump_transfer_message(struct spi_controller *ctlr, dev_err(&ctlr->dev, "failed to transfer one message from queue\n"); return ret; - } else { - WRITE_ONCE(ctlr->cur_msg_need_completion, true); - smp_mb(); /* see spi_finalize_current_message()... */ - if (READ_ONCE(ctlr->cur_msg_incomplete)) - wait_for_completion(&ctlr->cur_msg_completion); } + WRITE_ONCE(ctlr->cur_msg_need_completion, true); + smp_mb(); /* See spi_finalize_current_message()... */ + if (READ_ONCE(ctlr->cur_msg_incomplete)) + wait_for_completion(&ctlr->cur_msg_completion); + return 0; } -- 2.32.0