From: Frank Li <Frank.li@oss.nxp.com>
To: Vladimir Zapolskiy <vz@kernel.org>
Cc: Zhou Wang <wangzhou1@hisilicon.com>,
Longfang Liu <liulongfang@huawei.com>,
Vinod Koul <vkoul@kernel.org>, Frank Li <Frank.Li@kernel.org>,
Zhenfa Qiu <qiuzhenfa@hisilicon.com>,
dmaengine@vger.kernel.org
Subject: Re: [PATCH] dmaengine: hisilicon: Return -ENOMEM on dynamic memory allocation in probe
Date: Tue, 30 Jun 2026 10:02:56 -0500 [thread overview]
Message-ID: <akPaoAElTBK8V9Oy@SMW015318> (raw)
In-Reply-To: <20260630144214.4080302-1-vz@kernel.org>
On Tue, Jun 30, 2026 at 05:42:14PM +0300, Vladimir Zapolskiy wrote:
>
> Out of memory situation on driver's probe is expected to be reported to
> the driver's framework with a proper -ENOMEM error code.
>
> Fixes: e9f08b65250d ("dmaengine: hisilicon: Add Kunpeng DMA engine support")
> Signed-off-by: Vladimir Zapolskiy <vz@kernel.org>
> ---
Reviewed-by: Frank Li <Frank.Li@nxp.com>
> drivers/dma/hisi_dma.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/dma/hisi_dma.c b/drivers/dma/hisi_dma.c
> index 28bf818f9aa6..c751a2e49e6d 100644
> --- a/drivers/dma/hisi_dma.c
> +++ b/drivers/dma/hisi_dma.c
> @@ -983,7 +983,7 @@ static int hisi_dma_probe(struct pci_dev *pdev, const struct pci_device_id *id)
> hdma_dev = devm_kzalloc(dev, struct_size(hdma_dev, chan, chan_num),
> GFP_KERNEL);
> if (!hdma_dev)
> - return -EINVAL;
> + return -ENOMEM;
>
> hdma_dev->base = pcim_iomap_table(pdev)[PCI_BAR_2];
> hdma_dev->pdev = pdev;
> --
> 2.51.0
>
next prev parent reply other threads:[~2026-06-30 15:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-30 14:42 [PATCH] dmaengine: hisilicon: Return -ENOMEM on dynamic memory allocation in probe Vladimir Zapolskiy
2026-06-30 14:57 ` sashiko-bot
2026-06-30 15:02 ` Frank Li [this message]
2026-07-02 16:03 ` Vinod Koul
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=akPaoAElTBK8V9Oy@SMW015318 \
--to=frank.li@oss.nxp.com \
--cc=Frank.Li@kernel.org \
--cc=dmaengine@vger.kernel.org \
--cc=liulongfang@huawei.com \
--cc=qiuzhenfa@hisilicon.com \
--cc=vkoul@kernel.org \
--cc=vz@kernel.org \
--cc=wangzhou1@hisilicon.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