aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorJoachim Eastwood <manabian@gmail.com>2011-06-01 17:59:10 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-06-03 05:04:17 -0400
commit840d8e5e964dc51673d0f26e119b27d2898e8417 (patch)
treefaf9c6876a6ac09ad8ca4b4793d97480b0fb843e /sound
parentea02c63d57d7ec099f66ddb2942b4022e865cd5f (diff)
ASoC: atmel_ssc: Don't try to free ssc if request failed
We should only call ssc_free() when ssc_request() succeeds or bad things will happen. Signed-off-by: Joachim Eastwood <joachim.eastwood@jotron.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/atmel/atmel_ssc_dai.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/soc/atmel/atmel_ssc_dai.c b/sound/soc/atmel/atmel_ssc_dai.c
index 7fbfa051f6e1..eda955b15834 100644
--- a/sound/soc/atmel/atmel_ssc_dai.c
+++ b/sound/soc/atmel/atmel_ssc_dai.c
@@ -848,9 +848,10 @@ int atmel_ssc_set_audio(int ssc_id)
848 if (IS_ERR(ssc)) 848 if (IS_ERR(ssc))
849 pr_warn("Unable to parent ASoC SSC DAI on SSC: %ld\n", 849 pr_warn("Unable to parent ASoC SSC DAI on SSC: %ld\n",
850 PTR_ERR(ssc)); 850 PTR_ERR(ssc));
851 else 851 else {
852 ssc_pdev->dev.parent = &(ssc->pdev->dev); 852 ssc_pdev->dev.parent = &(ssc->pdev->dev);
853 ssc_free(ssc); 853 ssc_free(ssc);
854 }
854 855
855 ret = platform_device_add(ssc_pdev); 856 ret = platform_device_add(ssc_pdev);
856 if (ret < 0) 857 if (ret < 0)