summaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorSimon Baatz <gmbnomis@gmail.com>2012-07-19 00:04:09 +0200
committerAndrew Lunn <andrew@lunn.ch>2012-07-25 17:06:21 +0200
commitbaffab28b13120694fa3ebab08d3e99667a851d2 (patch)
treeba6021fe52fd1814b06ab07ba2aa8f51c6c2da06 /drivers/usb
parent30e0f58035073c895a8d33e1521e412be73e02bc (diff)
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/usb')
-rw-r--r--drivers/usb/host/ehci-orion.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/host/ehci-orion.c b/drivers/usb/host/ehci-orion.c
index 82de1073aa5..c6903e3af29 100644
--- a/drivers/usb/host/ehci-orion.c
+++ b/drivers/usb/host/ehci-orion.c
@@ -298,6 +298,10 @@ static int __devinit ehci_orion_drv_probe(struct platform_device *pdev)
err4:
usb_put_hcd(hcd);
err3:
+ if (!IS_ERR(clk)) {
+ clk_disable_unprepare(clk);
+ clk_put(clk);
+ }
iounmap(regs);
err2:
release_mem_region(res->start, resource_size(res));