aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorNicolas Ferre <nicolas.ferre@atmel.com>2011-05-26 07:44:12 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-05-26 10:10:11 -0400
commit2cdcd951c456fecbeb11fc42aa7d90f172dc58ef (patch)
treee74c6ced7b4013c8dd2c844cbadb642f6fbd09ad /sound
parent97b4fc3c445bf10b6fe0d8543137a6ad30a0fdab (diff)
ASoC: atmel_ssc_dai: fix ssc error path
We do not have to free a resource that is not allocated yet. Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.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.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sound/soc/atmel/atmel_ssc_dai.c b/sound/soc/atmel/atmel_ssc_dai.c
index 7fbfa051f6e1..a7a7bbc07627 100644
--- a/sound/soc/atmel/atmel_ssc_dai.c
+++ b/sound/soc/atmel/atmel_ssc_dai.c
@@ -838,10 +838,8 @@ int atmel_ssc_set_audio(int ssc_id)
838 } 838 }
839 839
840 ssc_pdev = platform_device_alloc("atmel-ssc-dai", ssc_id); 840 ssc_pdev = platform_device_alloc("atmel-ssc-dai", ssc_id);
841 if (!ssc_pdev) { 841 if (!ssc_pdev)
842 ssc_free(ssc);
843 return -ENOMEM; 842 return -ENOMEM;
844 }
845 843
846 /* If we can grab the SSC briefly to parent the DAI device off it */ 844 /* If we can grab the SSC briefly to parent the DAI device off it */
847 ssc = ssc_request(ssc_id); 845 ssc = ssc_request(ssc_id);