summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-at91-usart.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 17:35:05 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 17:39:31 +0000
commit85c675d0d09a45a135bddd15d7b385f8758c32fb (patch)
tree76267dbc9b9a130337be3640948fe397b04ac629 /drivers/spi/spi-at91-usart.c
parentAdding upstream version 6.6.15. (diff)
downloadlinux-85c675d0d09a45a135bddd15d7b385f8758c32fb.tar.xz
linux-85c675d0d09a45a135bddd15d7b385f8758c32fb.zip
Adding upstream version 6.7.7.upstream/6.7.7
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'drivers/spi/spi-at91-usart.c')
-rw-r--r--drivers/spi/spi-at91-usart.c22
1 files changed, 4 insertions, 18 deletions
diff --git a/drivers/spi/spi-at91-usart.c b/drivers/spi/spi-at91-usart.c
index b11d0f993c..1cea8e1593 100644
--- a/drivers/spi/spi-at91-usart.c
+++ b/drivers/spi/spi-at91-usart.c
@@ -132,28 +132,14 @@ static int at91_usart_spi_configure_dma(struct spi_controller *ctlr,
dma_cap_set(DMA_SLAVE, mask);
ctlr->dma_tx = dma_request_chan(dev, "tx");
- if (IS_ERR_OR_NULL(ctlr->dma_tx)) {
- if (IS_ERR(ctlr->dma_tx)) {
- err = PTR_ERR(ctlr->dma_tx);
- goto at91_usart_spi_error_clear;
- }
-
- dev_dbg(dev,
- "DMA TX channel not available, SPI unable to use DMA\n");
- err = -EBUSY;
+ if (IS_ERR(ctlr->dma_tx)) {
+ err = PTR_ERR(ctlr->dma_tx);
goto at91_usart_spi_error_clear;
}
ctlr->dma_rx = dma_request_chan(dev, "rx");
- if (IS_ERR_OR_NULL(ctlr->dma_rx)) {
- if (IS_ERR(ctlr->dma_rx)) {
- err = PTR_ERR(ctlr->dma_rx);
- goto at91_usart_spi_error;
- }
-
- dev_dbg(dev,
- "DMA RX channel not available, SPI unable to use DMA\n");
- err = -EBUSY;
+ if (IS_ERR(ctlr->dma_rx)) {
+ err = PTR_ERR(ctlr->dma_rx);
goto at91_usart_spi_error;
}