summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorTobias Jordan <Tobias.Jordan@elektrobit.com>2017-12-06 15:23:23 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-01-02 20:35:12 +0100
commit99cf2daf0da31b0b1853d1ccec9fbabc9d5856ae (patch)
treee27e037ceb8ab257167d4890e8343612b4568d91 /drivers
parentf75f910ffa90af17eeca18714847eaa0f16cb4ad (diff)
net: mvmdio: disable/unprepare clocks in EPROBE_DEFER case
[ Upstream commit 589bf32f09852041fbd3b7ce1a9e703f95c230ba ] add appropriate calls to clk_disable_unprepare() by jumping to out_mdio in case orion_mdio_probe() returns -EPROBE_DEFER. Found by Linux Driver Verification project (linuxtesting.org). Fixes: 3d604da1e954 ("net: mvmdio: get and enable optional clock") Signed-off-by: Tobias Jordan <Tobias.Jordan@elektrobit.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/marvell/mvmdio.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/marvell/mvmdio.c b/drivers/net/ethernet/marvell/mvmdio.c
index a0d1b084ecec..7aeb7fedb364 100644
--- a/drivers/net/ethernet/marvell/mvmdio.c
+++ b/drivers/net/ethernet/marvell/mvmdio.c
@@ -232,7 +232,8 @@ static int orion_mdio_probe(struct platform_device *pdev)
dev->regs + MVMDIO_ERR_INT_MASK);
} else if (dev->err_interrupt == -EPROBE_DEFER) {
- return -EPROBE_DEFER;
+ ret = -EPROBE_DEFER;
+ goto out_mdio;
}
mutex_init(&dev->lock);