aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorSimon Baatz <gmbnomis@gmail.com>2012-07-18 18:04:09 -0400
committerAndrew Lunn <andrew@lunn.ch>2012-07-25 11:06:21 -0400
commitbaffab28b13120694fa3ebab08d3e99667a851d2 (patch)
treeba6021fe52fd1814b06ab07ba2aa8f51c6c2da06 /sound
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 '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)
458 } 458 }
459 clk_prepare_enable(priv->clk); 459 clk_prepare_enable(priv->clk);
460 460
461 return snd_soc_register_dai(&pdev->dev, &kirkwood_i2s_dai); 461 err = snd_soc_register_dai(&pdev->dev, &kirkwood_i2s_dai);
462 if (!err)
463 return 0;
464 dev_err(&pdev->dev, "snd_soc_register_dai failed\n");
465
466 clk_disable_unprepare(priv->clk);
467 clk_put(priv->clk);
462 468
463err_ioremap: 469err_ioremap:
464 iounmap(priv->io); 470 iounmap(priv->io);