spi: s3c64xx: propagate the dma_submit_error() error code
authorTudor Ambarus <tudor.ambarus@linaro.org>
Wed, 7 Feb 2024 12:04:25 +0000 (12:04 +0000)
committerMark Brown <broonie@kernel.org>
Thu, 8 Feb 2024 16:33:35 +0000 (16:33 +0000)
DMA submit should just add the dma descriptor to a queue, without firing
it. EIO is misleading and hides what happens in DMA. Propagate the
dma_submit_error() error code, don't overwrite it.

Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
Link: https://lore.kernel.org/r/20240207120431.2766269-12-tudor.ambarus@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-s3c64xx.c

index 5da82013e17bdb9ae4ace6856961ba43d0c530eb..6012c88cb2ec68e6eb34a60811bc3d4c59f9f322 100644 (file)
@@ -322,7 +322,7 @@ static int prepare_dma(struct s3c64xx_spi_dma_data *dma,
        ret = dma_submit_error(dma->cookie);
        if (ret) {
                dev_err(&sdd->pdev->dev, "DMA submission failed");
-               return -EIO;
+               return ret;
        }
 
        dma_async_issue_pending(dma->ch);