summaryrefslogtreecommitdiffstats
path: root/sound
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 /sound
parent30e0f58035073c895a8d33e1521e412be73e02bc (diff)
downloadblackbird-op-linux-baffab28b13120694fa3ebab08d3e99667a851d2.tar.gz
blackbird-op-linux-baffab28b13120694fa3ebab08d3e99667a851d2.zip
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 'sound')
-rw-r--r--sound/soc/kirkwood/kirkwood-i2s.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sound/soc/kirkwood/kirkwood-i2s.c b/sound/soc/kirkwood/kirkwood-i2s.c
index fa4556750451..7646dd7f30cb 100644
--- a/sound/soc/kirkwood/kirkwood-i2s.c
+++ b/sound/soc/kirkwood/kirkwood-i2s.c
@@ -458,7 +458,13 @@ static __devinit int kirkwood_i2s_dev_probe(struct platform_device *pdev)
}
clk_prepare_enable(priv->clk);
- return snd_soc_register_dai(&pdev->dev, &kirkwood_i2s_dai);
+ err = snd_soc_register_dai(&pdev->dev, &kirkwood_i2s_dai);
+ if (!err)
+ return 0;
+ dev_err(&pdev->dev, "snd_soc_register_dai failed\n");
+
+ clk_disable_unprepare(priv->clk);
+ clk_put(priv->clk);
err_ioremap:
iounmap(priv->io);
OpenPOWER on IntegriCloud