diff options
author | Simon Baatz <gmbnomis@gmail.com> | 2012-07-19 00:04:09 +0200 |
---|---|---|
committer | Andrew Lunn <andrew@lunn.ch> | 2012-07-25 17:06:21 +0200 |
commit | baffab28b13120694fa3ebab08d3e99667a851d2 (patch) | |
tree | ba6021fe52fd1814b06ab07ba2aa8f51c6c2da06 /sound/soc/kirkwood | |
parent | 30e0f58035073c895a8d33e1521e412be73e02bc (diff) | |
download | op-kernel-dev-baffab28b13120694fa3ebab08d3e99667a851d2.zip op-kernel-dev-baffab28b13120694fa3ebab08d3e99667a851d2.tar.gz |
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/soc/kirkwood')
-rw-r--r-- | sound/soc/kirkwood/kirkwood-i2s.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sound/soc/kirkwood/kirkwood-i2s.c b/sound/soc/kirkwood/kirkwood-i2s.c index fa45567..7646dd7 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); |