]> git.baikalelectronics.ru Git - kernel.git/commit
spi: dw: Discard chip enabling on DMA setup error
authorBaikal Electronics <support@baikalelectronics.ru>
Wed, 7 Oct 2020 23:55:01 +0000 (02:55 +0300)
committerMark Brown <broonie@kernel.org>
Thu, 8 Oct 2020 22:00:15 +0000 (23:00 +0100)
commit31fcb1147d381ca851d567e93e4647f535bbfe08
tree582c7329c8eacb04fb240dc641edc357295d3031
parent157a0d90eb6557072f76aa425ba55f736be294a3
spi: dw: Discard chip enabling on DMA setup error

It's pointless to enable the chip back if the DMA setup procedure fails,
since we'll disable it on the next transfer anyway. For the same reason We
don't do that in case of a failure detected in any other methods called
from the transfer_one() method.

While at it consider any non-zero value returned from the dma_setup
callback to be erroneous as it's supposed to be in the kernel.

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