diff options
author | Simon Baatz <gmbnomis@gmail.com> | 2012-07-18 22:04:09 (GMT) |
---|---|---|
committer | Andrew Lunn <andrew@lunn.ch> | 2012-07-25 15:06:21 (GMT) |
commit | baffab28b13120694fa3ebab08d3e99667a851d2 (patch) | |
tree | ba6021fe52fd1814b06ab07ba2aa8f51c6c2da06 /drivers/usb/host | |
parent | 30e0f58035073c895a8d33e1521e412be73e02bc (diff) | |
download | linux-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/usb/host')
-rw-r--r-- | drivers/usb/host/ehci-orion.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/host/ehci-orion.c b/drivers/usb/host/ehci-orion.c index 82de107..c6903e3 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)); |