Commit 840d8e5e authored by Joachim Eastwood's avatar Joachim Eastwood Committed by Mark Brown

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: default avatarJoachim Eastwood <joachim.eastwood@jotron.com>
Acked-by: default avatarLiam Girdwood <lrg@ti.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent ea02c63d
...@@ -848,9 +848,10 @@ int atmel_ssc_set_audio(int ssc_id) ...@@ -848,9 +848,10 @@ int atmel_ssc_set_audio(int ssc_id)
if (IS_ERR(ssc)) if (IS_ERR(ssc))
pr_warn("Unable to parent ASoC SSC DAI on SSC: %ld\n", pr_warn("Unable to parent ASoC SSC DAI on SSC: %ld\n",
PTR_ERR(ssc)); PTR_ERR(ssc));
else else {
ssc_pdev->dev.parent = &(ssc->pdev->dev); ssc_pdev->dev.parent = &(ssc->pdev->dev);
ssc_free(ssc); ssc_free(ssc);
}
ret = platform_device_add(ssc_pdev); ret = platform_device_add(ssc_pdev);
if (ret < 0) if (ret < 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment