[PATCH 1/8] spi: stm32: properly handle 0 byte transfer
Mark Brown
broonie at kernel.org
Fri Feb 5 08:29:42 EST 2021
On Fri, Feb 05, 2021 at 12:08:55PM +0100, Alain Volmat wrote:
> On 0 byte transfer request, return straight from the
> xfer function after finalizing the transfer.
> + if (transfer->len == 0) {
> + spi_finalize_current_transfer(master);
> + return 0;
The driver only needs to finalize the transfer if it returned a value
greater than 0, returning 0 indicates that the transfer is already done.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20210205/bc493873/attachment.sig>
More information about the linux-arm-kernel
mailing list