aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorOleg Matcovschi <oleg.matcovschi@ti.com>2012-04-24 22:02:02 -0400
committerLiam Girdwood <lrg@ti.com>2012-05-04 07:09:28 -0400
commitfad9365bcc2a69ae16adc092e8ac192354980665 (patch)
treeba91112e49080400af70a4b94b4b2de1fb67e465 /sound
parent1a38336b8611a04f0a624330c1f815421f4bf5f4 (diff)
ASoC: omap-pcm: Free dma buffers in case of error.
Signed-off-by: Oleg Matcovschi <oleg.matcovschi@ti.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@ti.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/omap/omap-pcm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c
index a59bd352d342..5a649da9122a 100644
--- a/sound/soc/omap/omap-pcm.c
+++ b/sound/soc/omap/omap-pcm.c
@@ -401,6 +401,10 @@ static int omap_pcm_new(struct snd_soc_pcm_runtime *rtd)
401 } 401 }
402 402
403out: 403out:
404 /* free preallocated buffers in case of error */
405 if (ret)
406 omap_pcm_free_dma_buffers(pcm);
407
404 return ret; 408 return ret;
405} 409}
406 410