* [PATCH] dmaengine: idma64: Add check for dma_set_max_seg_size
@ 2024-04-03 2:49 Chen Ni
2024-04-03 9:51 ` Andy Shevchenko
2024-04-07 16:38 ` Vinod Koul
0 siblings, 2 replies; 3+ messages in thread
From: Chen Ni @ 2024-04-03 2:49 UTC (permalink / raw)
To: vkoul, andriy.shevchenko; +Cc: dmaengine, linux-kernel, Chen Ni
As the possible failure of the dma_set_max_seg_size(), it should be
better to check the return value of the dma_set_max_seg_size().
Fixes: e3fdb1894cfa ("dmaengine: idma64: set maximum allowed segment size for DMA")
Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
---
drivers/dma/idma64.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/dma/idma64.c b/drivers/dma/idma64.c
index 78a938969d7d..58ac374efa3b 100644
--- a/drivers/dma/idma64.c
+++ b/drivers/dma/idma64.c
@@ -594,7 +594,9 @@ static int idma64_probe(struct idma64_chip *chip)
idma64->dma.dev = chip->sysdev;
- dma_set_max_seg_size(idma64->dma.dev, IDMA64C_CTLH_BLOCK_TS_MASK);
+ ret = dma_set_max_seg_size(idma64->dma.dev, IDMA64C_CTLH_BLOCK_TS_MASK);
+ if (ret)
+ return ret;
ret = dma_async_device_register(&idma64->dma);
if (ret)
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] dmaengine: idma64: Add check for dma_set_max_seg_size
2024-04-03 2:49 [PATCH] dmaengine: idma64: Add check for dma_set_max_seg_size Chen Ni
@ 2024-04-03 9:51 ` Andy Shevchenko
2024-04-07 16:38 ` Vinod Koul
1 sibling, 0 replies; 3+ messages in thread
From: Andy Shevchenko @ 2024-04-03 9:51 UTC (permalink / raw)
To: Chen Ni; +Cc: vkoul, dmaengine, linux-kernel
On Wed, Apr 03, 2024 at 02:49:32AM +0000, Chen Ni wrote:
> As the possible failure of the dma_set_max_seg_size(), it should be
> better to check the return value of the dma_set_max_seg_size().
OK.
Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] dmaengine: idma64: Add check for dma_set_max_seg_size
2024-04-03 2:49 [PATCH] dmaengine: idma64: Add check for dma_set_max_seg_size Chen Ni
2024-04-03 9:51 ` Andy Shevchenko
@ 2024-04-07 16:38 ` Vinod Koul
1 sibling, 0 replies; 3+ messages in thread
From: Vinod Koul @ 2024-04-07 16:38 UTC (permalink / raw)
To: andriy.shevchenko, Chen Ni; +Cc: dmaengine, linux-kernel
On Wed, 03 Apr 2024 02:49:32 +0000, Chen Ni wrote:
> As the possible failure of the dma_set_max_seg_size(), it should be
> better to check the return value of the dma_set_max_seg_size().
>
>
Applied, thanks!
[1/1] dmaengine: idma64: Add check for dma_set_max_seg_size
commit: 2b1c1cf08a0addb6df42f16b37133dc7a351de29
Best regards,
--
~Vinod
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-04-07 16:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-03 2:49 [PATCH] dmaengine: idma64: Add check for dma_set_max_seg_size Chen Ni
2024-04-03 9:51 ` Andy Shevchenko
2024-04-07 16:38 ` Vinod Koul
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox