From: angkery <angkery@163.com>
To: sean.wang@mediatek.com, vkoul@kernel.org, matthias.bgg@gmail.com,
long.cheng@mediatek.com
Cc: dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org,
Junlin Yang <yangjunlin@yulong.com>
Subject: [PATCH v1] dmaengine: mediatek: Return the correct errno code
Date: Mon, 21 Jun 2021 14:20:48 +0800 [thread overview]
Message-ID: <20210621062048.1935-1-angkery@163.com> (raw)
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
next reply other threads:[~2021-06-21 6:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-21 6:20 angkery [this message]
2021-06-21 8:29 ` [PATCH v1] dmaengine: mediatek: Return the correct errno code Vinod Koul
2021-06-21 12:56 ` Junlin Yang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210621062048.1935-1-angkery@163.com \
--to=angkery@163.com \
--cc=dmaengine@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=long.cheng@mediatek.com \
--cc=matthias.bgg@gmail.com \
--cc=sean.wang@mediatek.com \
--cc=vkoul@kernel.org \
--cc=yangjunlin@yulong.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).