* [PATCH] dmaengine: dw-axi-dmac: Add check for dma_set_max_seg_size in dw_probe()
@ 2024-06-26 8:54 Ma Ke
2024-06-26 15:45 ` Markus Elfring
0 siblings, 1 reply; 2+ messages in thread
From: Ma Ke @ 2024-06-26 8:54 UTC (permalink / raw)
To: Eugeniy.Paltsev, vkoul, andriy.shevchenko, jee.heng.sia
Cc: dmaengine, linux-kernel, Ma Ke
As the possible failure of the dma_set_max_seg_size(), we should better
check the return value of the dma_set_max_seg_size().
Fixes: 78a90a1e489e ("dmaengine: dw-axi-dmac: Set constraint to the Max segment size")
Signed-off-by: Ma Ke <make24@iscas.ac.cn>
---
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
index fffafa86d964..689667e10928 100644
--- a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
+++ b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
@@ -1579,7 +1579,10 @@ static int dw_probe(struct platform_device *pdev)
* Therefore, set constraint to 1024 * 4.
*/
dw->dma.dev->dma_parms = &dw->dma_parms;
- dma_set_max_seg_size(&pdev->dev, MAX_BLOCK_SIZE);
+ ret = dma_set_max_seg_size(&pdev->dev, MAX_BLOCK_SIZE);
+ if (ret)
+ return ret;
+
platform_set_drvdata(pdev, chip);
pm_runtime_enable(chip->dev);
--
2.25.1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-06-26 15:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-26 8:54 [PATCH] dmaengine: dw-axi-dmac: Add check for dma_set_max_seg_size in dw_probe() Ma Ke
2024-06-26 15:45 ` Markus Elfring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®