diff mbox series

[v1] dmaengine: mediatek: Return the correct errno code

Message ID 20210621062048.1935-1-angkery@163.com (mailing list archive)
State New, archived
Headers show
Series [v1] dmaengine: mediatek: Return the correct errno code | expand

Commit Message

Junlin Yang June 21, 2021, 6:20 a.m. UTC
From: Junlin Yang <yangjunlin@yulong.com>

When devm_kzalloc failed, should return ENOMEM rather than ENODEV.

Fixes: 9135408c3ace ("dmaengine: mediatek: Add MediaTek UART APDMA support")
Signed-off-by: Junlin Yang <yangjunlin@yulong.com>
---
Changes in v1:
Add fixes tags.

 drivers/dma/mediatek/mtk-uart-apdma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Vinod Koul June 21, 2021, 8:29 a.m. UTC | #1
On 21-06-21, 14:20, angkery wrote:
> From: Junlin Yang <yangjunlin@yulong.com>
> 
> When devm_kzalloc failed, should return ENOMEM rather than ENODEV.
> 
> Fixes: 9135408c3ace ("dmaengine: mediatek: Add MediaTek UART APDMA support")
> Signed-off-by: Junlin Yang <yangjunlin@yulong.com>

Patch was sent by angkery <angkery@163.com> and signed off by Junlin
Yang <yangjunlin@yulong.com>. I would need s-o-b by sender as well...

Thanks
Junlin Yang June 21, 2021, 12:56 p.m. UTC | #2
On Mon, 21 Jun 2021 13:59:31 +0530
Vinod Koul <vkoul@kernel.org> wrote:

> On 21-06-21, 14:20, angkery wrote:
> > From: Junlin Yang <yangjunlin@yulong.com>
> > 
> > When devm_kzalloc failed, should return ENOMEM rather than ENODEV.
> > 
> > Fixes: 9135408c3ace ("dmaengine: mediatek: Add MediaTek UART APDMA
> > support") Signed-off-by: Junlin Yang <yangjunlin@yulong.com>  
> 
> Patch was sent by angkery <angkery@163.com> and signed off by Junlin
> Yang <yangjunlin@yulong.com>. I would need s-o-b by sender as well...
> 
> Thanks
> 

Due to the mailbox problem, I configured a sending mailbox, and now I
change the mailbox display name.

Thanks
--
Junlin Yang
diff mbox series

Patch

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;
 		}