summaryrefslogtreecommitdiffstats
path: root/sound/soc/mxs
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2013-09-17 10:20:09 +0530
committerMark Brown <broonie@linaro.org>2013-09-19 14:57:37 +0100
commitfcd70eb50e2d572a67839410aa30f6b545355980 (patch)
tree3d31b4914562b0707e95ca04ce0e608227f890d4 /sound/soc/mxs
parent256218ae65d2e59ef5d257355791a62af7d31b3c (diff)
downloadlinux-fcd70eb50e2d572a67839410aa30f6b545355980.tar.bz2
ASoC: mxs-saif: Use devm_snd_soc_register_component
devm_snd_soc_register_component makes code simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/mxs')
-rw-r--r--sound/soc/mxs/mxs-saif.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/sound/soc/mxs/mxs-saif.c b/sound/soc/mxs/mxs-saif.c
index b56b8a0e8deb..14152f6f70dd 100644
--- a/sound/soc/mxs/mxs-saif.c
+++ b/sound/soc/mxs/mxs-saif.c
@@ -768,8 +768,8 @@ static int mxs_saif_probe(struct platform_device *pdev)
dev_warn(&pdev->dev, "failed to init clocks\n");
}
- ret = snd_soc_register_component(&pdev->dev, &mxs_saif_component,
- &mxs_saif_dai, 1);
+ ret = devm_snd_soc_register_component(&pdev->dev, &mxs_saif_component,
+ &mxs_saif_dai, 1);
if (ret) {
dev_err(&pdev->dev, "register DAI failed\n");
return ret;
@@ -778,21 +778,15 @@ static int mxs_saif_probe(struct platform_device *pdev)
ret = mxs_pcm_platform_register(&pdev->dev);
if (ret) {
dev_err(&pdev->dev, "register PCM failed: %d\n", ret);
- goto failed_pdev_alloc;
+ return ret;
}
return 0;
-
-failed_pdev_alloc:
- snd_soc_unregister_component(&pdev->dev);
-
- return ret;
}
static int mxs_saif_remove(struct platform_device *pdev)
{
mxs_pcm_platform_unregister(&pdev->dev);
- snd_soc_unregister_component(&pdev->dev);
return 0;
}