aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/tegra
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2013-12-14 00:29:11 -0500
committerMark Brown <broonie@linaro.org>2013-12-16 13:37:27 -0500
commit753834cb593da03b4efc468bb8cb76dbc0743b31 (patch)
tree2f7ee60d24b6b4479553c08c2661bc74181ca504 /sound/soc/tegra
parent7637af2e17f18bfe6264d834c6edee7706a0f15c (diff)
ASoC: tegra20-ac97: add missing clk_disable_unprepare() on error path
Add the missing clk_disable_unprepare() before return from tegra20_ac97_platform_probe() in the error handling case. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Reviewed-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/tegra')
-rw-r--r--sound/soc/tegra/tegra20_ac97.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/soc/tegra/tegra20_ac97.c b/sound/soc/tegra/tegra20_ac97.c
index ae27bcd586d2..088518d7694a 100644
--- a/sound/soc/tegra/tegra20_ac97.c
+++ b/sound/soc/tegra/tegra20_ac97.c
@@ -404,7 +404,7 @@ static int tegra20_ac97_platform_probe(struct platform_device *pdev)
404 ret = snd_soc_set_ac97_ops(&tegra20_ac97_ops); 404 ret = snd_soc_set_ac97_ops(&tegra20_ac97_ops);
405 if (ret) { 405 if (ret) {
406 dev_err(&pdev->dev, "Failed to set AC'97 ops: %d\n", ret); 406 dev_err(&pdev->dev, "Failed to set AC'97 ops: %d\n", ret);
407 goto err_asoc_utils_fini; 407 goto err_clk_disable_unprepare;
408 } 408 }
409 409
410 ret = snd_soc_register_component(&pdev->dev, &tegra20_ac97_component, 410 ret = snd_soc_register_component(&pdev->dev, &tegra20_ac97_component,
@@ -412,7 +412,7 @@ static int tegra20_ac97_platform_probe(struct platform_device *pdev)
412 if (ret) { 412 if (ret) {
413 dev_err(&pdev->dev, "Could not register DAI: %d\n", ret); 413 dev_err(&pdev->dev, "Could not register DAI: %d\n", ret);
414 ret = -ENOMEM; 414 ret = -ENOMEM;
415 goto err_asoc_utils_fini; 415 goto err_clk_disable_unprepare;
416 } 416 }
417 417
418 ret = tegra_pcm_platform_register(&pdev->dev); 418 ret = tegra_pcm_platform_register(&pdev->dev);
@@ -428,6 +428,8 @@ static int tegra20_ac97_platform_probe(struct platform_device *pdev)
428 428
429err_unregister_component: 429err_unregister_component:
430 snd_soc_unregister_component(&pdev->dev); 430 snd_soc_unregister_component(&pdev->dev);
431err_clk_disable_unprepare:
432 clk_disable_unprepare(ac97->clk_ac97);
431err_asoc_utils_fini: 433err_asoc_utils_fini:
432 tegra_asoc_utils_fini(&ac97->util_data); 434 tegra_asoc_utils_fini(&ac97->util_data);
433err_clk_put: 435err_clk_put: