Skip to content

Commit cfbcb61

Browse files
Sergei Shtylyovdavem330
authored andcommitted
mv643xx_eth: fix of_irq_to_resource() error check
of_irq_to_resource() has recently been fixed to return negative error #'s along with 0 in case of failure, however the Marvell MV643xx Ethernet driver still only regards 0 as invalid IRQ -- fix it up. Fixes: 7a4228b ("of: irq: use of_irq_get() in of_irq_to_resource()") Signed-off-by: Sergei Shtylyov <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 13332db commit cfbcb61

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/marvell/mv643xx_eth.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2734,7 +2734,7 @@ static int mv643xx_eth_shared_of_add_port(struct platform_device *pdev,
27342734
ppd.shared = pdev;
27352735

27362736
memset(&res, 0, sizeof(res));
2737-
if (!of_irq_to_resource(pnp, 0, &res)) {
2737+
if (of_irq_to_resource(pnp, 0, &res) <= 0) {
27382738
dev_err(&pdev->dev, "missing interrupt on %s\n", pnp->name);
27392739
return -EINVAL;
27402740
}

0 commit comments

Comments
 (0)