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