Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cb59c87d authored by Michal Simek's avatar Michal Simek Committed by David S. Miller
Browse files

net: ethernet: xilinx: Do not use NO_IRQ in axienet



This driver is used on Microblaze and will be used
on Arm Zynq.
Microblaze doesn't define NO_IRQ and no IRQ is 0.
Arm still uses NO_IRQ as -1 and there is no option
to connect IRQ to irq 0.

That's why <= 0 is only one option how to find out
undefined IRQ.

Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 94b144a7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1590,7 +1590,7 @@ static int axienet_of_probe(struct platform_device *op)
	lp->rx_irq = irq_of_parse_and_map(np, 1);
	lp->tx_irq = irq_of_parse_and_map(np, 0);
	of_node_put(np);
	if ((lp->rx_irq == NO_IRQ) || (lp->tx_irq == NO_IRQ)) {
	if ((lp->rx_irq <= 0) || (lp->tx_irq <= 0)) {
		dev_err(&op->dev, "could not determine irqs\n");
		ret = -ENOMEM;
		goto err_iounmap_2;