Re: [PATCH v3 3/3] net: xilinx: axienet: Propagate errors from platform_get_irq()
"Pandey, Radhey Shyam" <[email protected]>
| Newsgroups | gmane.linux.network,gmane.linux.ports.arm.kernel,gmane.linux.kernel |
|---|---|
| Message-ID | <[email protected]> |
On 8/17/2026 4:22 PM, [email protected] wrote: > From: bui duc phuc <[email protected]> > > 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 <[email protected]> This is a bug fix. So please add a fixes tag and same for 1/3 patch. Reviewed-by: Radhey Shyam Pandey <[email protected]> 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; >