* [PATCH] dmaengine: mediatek: mtk-uart-apdma: Return -ENOMEM on memory allocation failure
@ 2026-07-01 20:07 Vladimir Zapolskiy
2026-07-02 3:50 ` Frank Li
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Vladimir Zapolskiy @ 2026-07-01 20:07 UTC (permalink / raw)
To: Sean Wang, Matthias Brugger, AngeloGioacchino Del Regno,
Vinod Koul, Frank Li
Cc: Long Cheng, dmaengine, linux-arm-kernel, linux-mediatek
If dynamic memory allocation in driver's probe function execution fails, it
should be reported to the driver's framework with -ENOMEM error code.
Fixes: 9135408c3ace ("dmaengine: mediatek: Add MediaTek UART APDMA support")
Signed-off-by: Vladimir Zapolskiy <vz@kernel.org>
---
drivers/dma/mediatek/mtk-uart-apdma.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/dma/mediatek/mtk-uart-apdma.c b/drivers/dma/mediatek/mtk-uart-apdma.c
index c269d84d7bd2..f74e9a328588 100644
--- a/drivers/dma/mediatek/mtk-uart-apdma.c
+++ b/drivers/dma/mediatek/mtk-uart-apdma.c
@@ -531,7 +531,7 @@ static int mtk_uart_apdma_probe(struct platform_device *pdev)
for (i = 0; i < mtkd->dma_requests; i++) {
c = devm_kzalloc(mtkd->ddev.dev, sizeof(*c), GFP_KERNEL);
if (!c) {
- rc = -ENODEV;
+ rc = -ENOMEM;
goto err_no_dma;
}
--
2.51.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] dmaengine: mediatek: mtk-uart-apdma: Return -ENOMEM on memory allocation failure
2026-07-01 20:07 [PATCH] dmaengine: mediatek: mtk-uart-apdma: Return -ENOMEM on memory allocation failure Vladimir Zapolskiy
@ 2026-07-02 3:50 ` Frank Li
2026-07-02 8:21 ` AngeloGioacchino Del Regno
2026-07-02 15:32 ` Vinod Koul
2 siblings, 0 replies; 4+ messages in thread
From: Frank Li @ 2026-07-02 3:50 UTC (permalink / raw)
To: Vladimir Zapolskiy
Cc: Sean Wang, Matthias Brugger, AngeloGioacchino Del Regno,
Vinod Koul, Frank Li, Long Cheng, dmaengine, linux-arm-kernel,
linux-mediatek
On Wed, Jul 01, 2026 at 11:07:03PM +0300, Vladimir Zapolskiy wrote:
>
> If dynamic memory allocation in driver's probe function execution fails, it
> should be reported to the driver's framework with -ENOMEM error code.
>
> Fixes: 9135408c3ace ("dmaengine: mediatek: Add MediaTek UART APDMA support")
> Signed-off-by: Vladimir Zapolskiy <vz@kernel.org>
> ---
Reviewed-by: Frank Li <Frank.Li@nxp.com>
> drivers/dma/mediatek/mtk-uart-apdma.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/dma/mediatek/mtk-uart-apdma.c b/drivers/dma/mediatek/mtk-uart-apdma.c
> index c269d84d7bd2..f74e9a328588 100644
> --- a/drivers/dma/mediatek/mtk-uart-apdma.c
> +++ b/drivers/dma/mediatek/mtk-uart-apdma.c
> @@ -531,7 +531,7 @@ static int mtk_uart_apdma_probe(struct platform_device *pdev)
> for (i = 0; i < mtkd->dma_requests; i++) {
> c = devm_kzalloc(mtkd->ddev.dev, sizeof(*c), GFP_KERNEL);
> if (!c) {
> - rc = -ENODEV;
> + rc = -ENOMEM;
> goto err_no_dma;
> }
>
> --
> 2.51.0
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] dmaengine: mediatek: mtk-uart-apdma: Return -ENOMEM on memory allocation failure
2026-07-01 20:07 [PATCH] dmaengine: mediatek: mtk-uart-apdma: Return -ENOMEM on memory allocation failure Vladimir Zapolskiy
2026-07-02 3:50 ` Frank Li
@ 2026-07-02 8:21 ` AngeloGioacchino Del Regno
2026-07-02 15:32 ` Vinod Koul
2 siblings, 0 replies; 4+ messages in thread
From: AngeloGioacchino Del Regno @ 2026-07-02 8:21 UTC (permalink / raw)
To: Vladimir Zapolskiy, Sean Wang, Matthias Brugger, Vinod Koul,
Frank Li
Cc: Long Cheng, dmaengine, linux-arm-kernel, linux-mediatek
On 7/1/26 22:07, Vladimir Zapolskiy wrote:
> If dynamic memory allocation in driver's probe function execution fails, it
> should be reported to the driver's framework with -ENOMEM error code.
>
> Fixes: 9135408c3ace ("dmaengine: mediatek: Add MediaTek UART APDMA support")
> Signed-off-by: Vladimir Zapolskiy <vz@kernel.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] dmaengine: mediatek: mtk-uart-apdma: Return -ENOMEM on memory allocation failure
2026-07-01 20:07 [PATCH] dmaengine: mediatek: mtk-uart-apdma: Return -ENOMEM on memory allocation failure Vladimir Zapolskiy
2026-07-02 3:50 ` Frank Li
2026-07-02 8:21 ` AngeloGioacchino Del Regno
@ 2026-07-02 15:32 ` Vinod Koul
2 siblings, 0 replies; 4+ messages in thread
From: Vinod Koul @ 2026-07-02 15:32 UTC (permalink / raw)
To: Sean Wang, Matthias Brugger, AngeloGioacchino Del Regno, Frank Li,
Vladimir Zapolskiy
Cc: Long Cheng, dmaengine, linux-arm-kernel, linux-mediatek
On Wed, 01 Jul 2026 23:07:03 +0300, Vladimir Zapolskiy wrote:
> If dynamic memory allocation in driver's probe function execution fails, it
> should be reported to the driver's framework with -ENOMEM error code.
>
>
Applied, thanks!
[1/1] dmaengine: mediatek: mtk-uart-apdma: Return -ENOMEM on memory allocation failure
commit: 467265c750edd7ab43803deeafe7d3120a791d32
Best regards,
--
~Vinod
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-07-02 15:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-01 20:07 [PATCH] dmaengine: mediatek: mtk-uart-apdma: Return -ENOMEM on memory allocation failure Vladimir Zapolskiy
2026-07-02 3:50 ` Frank Li
2026-07-02 8:21 ` AngeloGioacchino Del Regno
2026-07-02 15:32 ` Vinod Koul
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox