[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20220302095724.170542-1-jiasheng@iscas.ac.cn>
Date: Wed, 2 Mar 2022 17:57:24 +0800
From: Jiasheng Jiang <jiasheng@...as.ac.cn>
To: vkoul@...nel.org
Cc: dmaengine@...r.kernel.org, linux-kernel@...r.kernel.org,
Jiasheng Jiang <jiasheng@...as.ac.cn>
Subject: [PATCH] drm/xlnx: Handle error for dma_set_mask
As the potential failure of the dma_set_mask(),
it should be better to check it and return error
if fails.
Fixes: d76271d22694 ("drm: xlnx: DRM/KMS driver for Xilinx ZynqMP DisplayPort Subsystem")
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 a262e0eb4cc9..e6cf3d174238 100644
--- a/drivers/dma/mmp_tdma.c
+++ b/drivers/dma/mmp_tdma.c
@@ -722,7 +722,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