dmaengine.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] dmaengine: mediatek: Return the correct errno code
@ 2021-06-21  6:20 angkery
  2021-06-21  8:29 ` Vinod Koul
  0 siblings, 1 reply; 3+ messages in thread
From: angkery @ 2021-06-21  6:20 UTC (permalink / raw)
  To: sean.wang, vkoul, matthias.bgg, long.cheng
  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.

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(-)

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 related	[flat|nested] 3+ messages in thread

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

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-21  6:20 [PATCH v1] dmaengine: mediatek: Return the correct errno code angkery
2021-06-21  8:29 ` Vinod Koul
2021-06-21 12:56   ` Junlin Yang

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).