spi: stm32: properly handle 0 byte transfer
authorAlain Volmat <alain.volmat@foss.st.com>
Fri, 5 Feb 2021 18:59:25 +0000 (19:59 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 4 Mar 2021 09:26:33 +0000 (10:26 +0100)
commit046a8158982bc67a56ce2b6c1e8ef020d2d49c05
tree9bd505b032968bbdf246a438d4f9c986317451be
parent3cb8510625d5441e60ac42de031e56628cec1237
spi: stm32: properly handle 0 byte transfer

[ Upstream commit 2269f5a8b1a7b38651d62676b98182828f29d11a ]

On 0 byte transfer request, return straight from the
xfer function after finalizing the transfer.

Fixes: dcbe0d84dfa5 ("spi: add driver for STM32 SPI controller")
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Link: https://lore.kernel.org/r/1612551572-495-2-git-send-email-alain.volmat@foss.st.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/spi/spi-stm32.c