[PATCH v3 1/3] net: xilinx: axienet: Propagate errors from optional IRQ lookup
Pandey, Radhey Shyam
radheys at amd.com
Mon Aug 17 06:58:10 PDT 2026
On 8/17/2026 4:22 PM, phucduc.bui at gmail.com wrote:
> From: bui duc phuc <phucduc.bui at gmail.com>
>
> platform_get_irq_optional() returns a positive IRQ number on success or
> a negative error code on failure. For an optional IRQ, -ENXIO indicates
> that no optional IRQ is available, while other errors should be propagated.
>
> Propagate all error codes returned by platform_get_irq_optional() other
> than -ENXIO.
>
> Another call to platform_get_irq_optional() in the same function already
> handles the return value this way. Apply the same error handling to this
> call site for consistency.
>
> Signed-off-by: bui duc phuc <phucduc.bui at gmail.com>
Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey at amd.com>
Thanks!
> ---
> drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
> index fcf517069d16..f92951422b2e 100644
> --- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
> +++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
> @@ -2972,6 +2972,8 @@ static int axienet_probe(struct platform_device *pdev)
> dev_err(&pdev->dev, "could not determine irqs\n");
> return -ENOMEM;
> }
> + if (lp->eth_irq < 0 && lp->eth_irq != -ENXIO)
> + return lp->eth_irq;
>
> /* Reset core now that clocks are enabled, prior to accessing MDIO */
> ret = __axienet_device_reset(lp);
More information about the linux-arm-kernel
mailing list