spi: spi.c: Remove redundant else block

Reported-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: David Jander <david@protonic.nl>
Link: https://lore.kernel.org/r/20220629142519.3985486-4-david@protonic.nl
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
David Jander 2022-06-29 16:25:19 +02:00 committed by Mark Brown
parent 95c8222f0e
commit 31d4c1bdf1
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0

View File

@ -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;
}