@@ -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;
}
Reported-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: David Jander <david@protonic.nl> --- drivers/spi/spi.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)