From: "Pandey, Radhey Shyam" <radheys@amd.com>
To: phucduc.bui@gmail.com,
Radhey Shyam Pandey <radhey.shyam.pandey@amd.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
davem@davemloft.net, Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Michal Simek <michal.simek@amd.com>,
Simon Horman <horms@kernel.org>
Cc: netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 3/3] net: xilinx: axienet: Propagate errors from platform_get_irq()
Date: Tue, 18 Aug 2026 12:11:18 +0530 [thread overview]
Message-ID: <a371aac8-2723-45d1-a226-1f523cd3d881@amd.com> (raw)
In-Reply-To: <20260817105241.63345-3-phucduc.bui@gmail.com>
On 8/17/2026 4:22 PM, phucduc.bui@gmail.com wrote:
> From: bui duc phuc <phucduc.bui@gmail.com>
>
> platform_get_irq() returns a non-zero IRQ number on success and a
> negative error number on failure. Therefore, 0 should not be treated
> as an invalid IRQ number.
>
> Propagate the original error code instead of overwriting it with
> -ENOMEM.
>
> Remove the redundant error message since platform_get_irq() already
> reports errors when the IRQ lookup fails.
>
> Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
This is a bug fix. So please add a fixes tag and same for 1/3 patch.
Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey@amd.com>
Thanks!
> ---
> drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
> index 50f88a38b6f6..d982ab6f8a4a 100644
> --- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
> +++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
> @@ -2968,10 +2968,10 @@ static int axienet_probe(struct platform_device *pdev)
> dev_err(&pdev->dev, "could not map DMA regs\n");
> return PTR_ERR(lp->dma_regs);
> }
> - if (lp->rx_irq <= 0 || lp->tx_irq <= 0) {
> - dev_err(&pdev->dev, "could not determine irqs\n");
> - return -ENOMEM;
> - }
> + if (lp->rx_irq < 0)
> + return lp->rx_irq;
> + if (lp->tx_irq < 0)
> + return lp->tx_irq;
> if (lp->eth_irq < 0 && lp->eth_irq != -ENXIO)
> return lp->eth_irq;
>
next prev parent reply other threads:[~2026-08-18 6:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-17 10:52 [PATCH v3 1/3] net: xilinx: axienet: Propagate errors from optional IRQ lookup phucduc.bui
2026-08-17 10:52 ` [PATCH v3 2/3] net: xilinx: axienet: Handle optional IRQ return value correctly phucduc.bui
2026-08-18 6:39 ` Pandey, Radhey Shyam
2026-08-20 9:42 ` Paolo Abeni
2026-08-20 11:19 ` Bui Duc Phuc
2026-08-17 10:52 ` [PATCH v3 3/3] net: xilinx: axienet: Propagate errors from platform_get_irq() phucduc.bui
2026-08-18 6:41 ` Pandey, Radhey Shyam [this message]
2026-08-17 13:58 ` [PATCH v3 1/3] net: xilinx: axienet: Propagate errors from optional IRQ lookup Pandey, Radhey Shyam
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=a371aac8-2723-45d1-a226-1f523cd3d881@amd.com \
--to=radheys@amd.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.simek@amd.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=phucduc.bui@gmail.com \
--cc=radhey.shyam.pandey@amd.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