dmaengine.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dmaengine: mediatek: Return the correct errno code
@ 2021-06-17 13:32 angkery
  2021-06-18 13:53 ` Matthias Brugger
  2021-06-21  5:52 ` Chen-Yu Tsai
  0 siblings, 2 replies; 3+ messages in thread
From: angkery @ 2021-06-17 13:32 UTC (permalink / raw)
  To: sean.wang, vkoul, matthias.bgg
  Cc: dmaengine, linux-arm-kernel, linux-mediatek, linux-kernel, Junlin Yang

From: Junlin Yang <yangjunlin@yulong.com>

When devm_kzalloc failed, should return ENOMEM rather than ENODEV.

Signed-off-by: Junlin Yang <yangjunlin@yulong.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 375e7e6..a4cb30f 100644
--- a/drivers/dma/mediatek/mtk-uart-apdma.c
+++ b/drivers/dma/mediatek/mtk-uart-apdma.c
@@ -529,7 +529,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;
 		}
 
-- 
1.9.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] dmaengine: mediatek: Return the correct errno code
  2021-06-17 13:32 [PATCH] dmaengine: mediatek: Return the correct errno code angkery
@ 2021-06-18 13:53 ` Matthias Brugger
  2021-06-21  5:52 ` Chen-Yu Tsai
  1 sibling, 0 replies; 3+ messages in thread
From: Matthias Brugger @ 2021-06-18 13:53 UTC (permalink / raw)
  To: angkery, sean.wang, vkoul
  Cc: dmaengine, linux-arm-kernel, linux-mediatek, linux-kernel, Junlin Yang



On 17/06/2021 15:32, angkery wrote:
> From: Junlin Yang <yangjunlin@yulong.com>
> 
> When devm_kzalloc failed, should return ENOMEM rather than ENODEV.
> 
> Signed-off-by: Junlin Yang <yangjunlin@yulong.com>

Reviewed-by: Matthias Brugger <matthias.bgg@gmail.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 375e7e6..a4cb30f 100644
> --- a/drivers/dma/mediatek/mtk-uart-apdma.c
> +++ b/drivers/dma/mediatek/mtk-uart-apdma.c
> @@ -529,7 +529,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;
>  		}
>  
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] dmaengine: mediatek: Return the correct errno code
  2021-06-17 13:32 [PATCH] dmaengine: mediatek: Return the correct errno code angkery
  2021-06-18 13:53 ` Matthias Brugger
@ 2021-06-21  5:52 ` Chen-Yu Tsai
  1 sibling, 0 replies; 3+ messages in thread
From: Chen-Yu Tsai @ 2021-06-21  5:52 UTC (permalink / raw)
  To: angkery
  Cc: sean.wang, vkoul, Matthias Brugger, dmaengine, linux-arm-kernel,
	linux-mediatek, linux-kernel, Junlin Yang

On Thu, Jun 17, 2021 at 9:35 PM angkery <angkery@163.com> wrote:
>
> From: Junlin Yang <yangjunlin@yulong.com>
>
> When devm_kzalloc failed, should return ENOMEM rather than ENODEV.
>
> Signed-off-by: Junlin Yang <yangjunlin@yulong.com>

Please add proper fixes tags:

Fixes: 9135408c3ace ("dmaengine: mediatek: Add MediaTek UART APDMA support")

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-06-21  5:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-17 13:32 [PATCH] dmaengine: mediatek: Return the correct errno code angkery
2021-06-18 13:53 ` Matthias Brugger
2021-06-21  5:52 ` Chen-Yu Tsai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).