From: Russell King Date: Mon, 10 Apr 2017 15:28:04 +0000 (+0100) Subject: net: mvmdio: disable interrupts in driver failure path X-Git-Tag: v4.12-rc1~108^2~172^2~5 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=37282485dd4c95c4a637cfa263a0753216f1ec24;p=users%2Fhch%2Fuuid.git net: mvmdio: disable interrupts in driver failure path When the mvmdio driver has an interrupt, it enables the "done" interrupt after requesting its interrupt handler. However, probe failure results in the interrupt being left enabled. Disable it on the failure path. Signed-off-by: Russell King Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/marvell/mvmdio.c b/drivers/net/ethernet/marvell/mvmdio.c index a0d1b084ecec..7aea0beca56e 100644 --- a/drivers/net/ethernet/marvell/mvmdio.c +++ b/drivers/net/ethernet/marvell/mvmdio.c @@ -251,6 +251,8 @@ static int orion_mdio_probe(struct platform_device *pdev) return 0; out_mdio: + if (dev->err_interrupt > 0) + writel(0, dev->regs + MVMDIO_ERR_INT_MASK); if (!IS_ERR(dev->clk)) clk_disable_unprepare(dev->clk); return ret;