Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Revert "net: mvmdio: avoid error message for optional IRQ"

This reverts commit e1f550dc44a4d535da4e25ada1b0eaf8f3417929.
platform_get_irq_optional() will still return -ENXIO when no interrupt
is provided so the additional error handling caused the driver prone to
fail when no interrupt was specified. Revert the change so we can apply
the correct minimal fix.

Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Chris Packham and committed by
David S. Miller
028fd76b 32ca98fe

+3 -3
+3 -3
drivers/net/ethernet/marvell/mvmdio.c
··· 347 347 } 348 348 349 349 350 - dev->err_interrupt = platform_get_irq_optional(pdev, 0); 350 + dev->err_interrupt = platform_get_irq(pdev, 0); 351 351 if (dev->err_interrupt > 0 && 352 352 resource_size(r) < MVMDIO_ERR_INT_MASK + 4) { 353 353 dev_err(&pdev->dev, ··· 364 364 writel(MVMDIO_ERR_INT_SMI_DONE, 365 365 dev->regs + MVMDIO_ERR_INT_MASK); 366 366 367 - } else if (dev->err_interrupt < 0) { 368 - ret = dev->err_interrupt; 367 + } else if (dev->err_interrupt == -EPROBE_DEFER) { 368 + ret = -EPROBE_DEFER; 369 369 goto out_mdio; 370 370 } 371 371