summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/marvell/mv643xx_eth.c
diff options
context:
space:
mode:
authorSimon Baatz <gmbnomis@gmail.com>2012-07-18 22:04:09 (GMT)
committerAndrew Lunn <andrew@lunn.ch>2012-07-25 15:06:21 (GMT)
commitbaffab28b13120694fa3ebab08d3e99667a851d2 (patch)
treeba6021fe52fd1814b06ab07ba2aa8f51c6c2da06 /drivers/net/ethernet/marvell/mv643xx_eth.c
parent30e0f58035073c895a8d33e1521e412be73e02bc (diff)
downloadlinux-baffab28b13120694fa3ebab08d3e99667a851d2.tar.xz
ARM: Orion: fix driver probe error handling with respect to clk
The clk patches added code to get and enable clocks in the respective driver probe functions. If the probe function failed for some reason after enabling the clock, the clock was not disabled again in many cases. Signed-off-by: Simon Baatz <gmbnomis@gmail.com> Signed-off-by: Andrew Lumm <andrew@lunn.ch>
Diffstat (limited to 'drivers/net/ethernet/marvell/mv643xx_eth.c')
-rw-r--r--drivers/net/ethernet/marvell/mv643xx_eth.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/ethernet/marvell/mv643xx_eth.c b/drivers/net/ethernet/marvell/mv643xx_eth.c
index f0f06b2..4fbba57 100644
--- a/drivers/net/ethernet/marvell/mv643xx_eth.c
+++ b/drivers/net/ethernet/marvell/mv643xx_eth.c
@@ -2983,6 +2983,12 @@ static int mv643xx_eth_probe(struct platform_device *pdev)
return 0;
out:
+#if defined(CONFIG_HAVE_CLK)
+ if (!IS_ERR(mp->clk)) {
+ clk_disable_unprepare(mp->clk);
+ clk_put(mp->clk);
+ }
+#endif
free_netdev(dev);
return err;