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 <[email protected]>
Signed-off-by: Andrew Lumm <[email protected]>
This commit is contained in:
Simon Baatz 2012-07-19 00:04:09 +02:00 • committed by Andrew Lunn
commit baffab28b1
6 changed files with 29 additions and 1 deletions

View file

@ -839,6 +839,10 @@ out:
if (r)
release_resource(r);
if (mmc)
if (!IS_ERR_OR_NULL(host->clk)) {
clk_disable_unprepare(host->clk);
clk_put(host->clk);
}
mmc_free_host(mmc);
return ret;