[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20230607022053.32696-1-jiasheng@iscas.ac.cn>
Date: Wed, 7 Jun 2023 10:20:53 +0800
From: Jiasheng Jiang <jiasheng@...as.ac.cn>
To: vkoul@...nel.org, zhangfei.gao@...vell.com, leoy@...vell.com,
zhouqiao@...vell.com
Cc: dmaengine@...r.kernel.org, linux-kernel@...r.kernel.org,
Jiasheng Jiang <jiasheng@...as.ac.cn>
Subject: [PATCH] dmaengine: mmp_tdma: Add missing check for dma_set_mask
Add check for dma_set_mask() and return the error if it fails.
Fixes: c6da0ba8dfc8 ("dmaengine: mmp_tdma: add mmp tdma support")
Signed-off-by: Jiasheng Jiang <jiasheng@...as.ac.cn>
---
drivers/dma/mmp_tdma.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/dma/mmp_tdma.c b/drivers/dma/mmp_tdma.c
index d49fa6bc6775..99cf4f7cd50b 100644
--- a/drivers/dma/mmp_tdma.c
+++ b/drivers/dma/mmp_tdma.c
@@ -717,7 +717,10 @@ static int mmp_tdma_probe(struct platform_device *pdev)
tdev->device.residue_granularity = DMA_RESIDUE_GRANULARITY_BURST;
tdev->device.descriptor_reuse = true;
- dma_set_mask(&pdev->dev, DMA_BIT_MASK(64));
+ ret = dma_set_mask(&pdev->dev, DMA_BIT_MASK(64));
+ if (ret)
+ return ret;
+
platform_set_drvdata(pdev, tdev);
ret = dmaenginem_async_device_register(&tdev->device);
--
2.25.1
Powered by blists - more mailing lists