diff --git a/drivers/net/ethernet/marvell/mvmdio.c b/drivers/net/ethernet/marvell/mvmdio.c index 7aea0beca56e54e83ddf2814b5e82c779cb1333d..6ea5caddca62bb602b1f50c7aa041c40a1ab9e99 100644 --- a/drivers/net/ethernet/marvell/mvmdio.c +++ b/drivers/net/ethernet/marvell/mvmdio.c @@ -263,7 +263,8 @@ static int orion_mdio_remove(struct platform_device *pdev) struct mii_bus *bus = platform_get_drvdata(pdev); struct orion_mdio_dev *dev = bus->priv; - writel(0, dev->regs + MVMDIO_ERR_INT_MASK); + if (dev->err_interrupt > 0) + writel(0, dev->regs + MVMDIO_ERR_INT_MASK); mdiobus_unregister(bus); if (!IS_ERR(dev->clk)) clk_disable_unprepare(dev->clk);