]> git.baikalelectronics.ru Git - kernel.git/commit
spi: dw-dma: Check rx_buf availability in the xfer method
authorBaikal Electronics <support@baikalelectronics.ru>
Sun, 20 Sep 2020 11:23:15 +0000 (14:23 +0300)
committerMark Brown <broonie@kernel.org>
Tue, 29 Sep 2020 15:37:08 +0000 (16:37 +0100)
commitf960fc0daf5b5e0c3d37bc69b9c25cad8e197735
treec9b95d9fdb2280ac65baf0be3bc38741f147b060
parente6ee48d796f7f911184d0888967d9c5dd5919b1d
spi: dw-dma: Check rx_buf availability in the xfer method

Checking rx_buf for being NULL and returning NULL from the Rx-channel
preparation method doesn't let us to distinguish that situation from
errors happening during the Rx SG-list preparation. So it's better to make
sure that the rx_buf not-NULL and full-duplex communication is requested
prior calling the Rx preparation method.

Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
Link: https://lore.kernel.org/r/20200920112322.24585-5-Sergey.Semin@baikalelectronics.ru
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-dw-dma.c