Skip to content

Commit

Permalink
ASoC: atmel_ssc: Don't try to free ssc if request failed
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Joachim Eastwood authored and Mark Brown committed Jun 3, 2011
1 parent ea02c63 commit 840d8e5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sound/soc/atmel/atmel_ssc_dai.c
Original file line number Diff line number Diff line change
Expand Up @@ -848,9 +848,10 @@ int atmel_ssc_set_audio(int ssc_id)
if (IS_ERR(ssc))
pr_warn("Unable to parent ASoC SSC DAI on SSC: %ld\n",
PTR_ERR(ssc));
else
else {
ssc_pdev->dev.parent = &(ssc->pdev->dev);
ssc_free(ssc);
ssc_free(ssc);
}

ret = platform_device_add(ssc_pdev);
if (ret < 0)
Expand Down

0 comments on commit 840d8e5

Please sign in to comment.