[PATCH] net: xilinx: axienet: Propagate errors from optional IRQ lookup
Andrew Lunn
andrew at lunn.ch
Tue Aug 11 10:00:40 PDT 2026
On Tue, Aug 11, 2026 at 10:47:15AM +0700, 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.
> @@ -3047,7 +3051,7 @@ static int axienet_probe(struct platform_device *pdev)
> ndev->ethtool_ops = &axienet_ethtool_ops;
> }
> /* Check for Ethernet core IRQ (optional) */
> - if (lp->eth_irq <= 0)
> + if (lp->eth_irq < 0)
> dev_info(&pdev->dev, "Ethernet core IRQ not defined\n");
What has this change got to do with what is described in the commit
message? If you think this is a needed change, please put it in a
commit of its own, with a good commit message.
Andrew
More information about the linux-arm-kernel
mailing list