From: Oleg Matcovschi Date: Wed, 25 Apr 2012 02:02:02 +0000 (-0700) Subject: ASoC: omap-pcm: Free dma buffers in case of error. X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=fad9365bcc2a69ae16adc092e8ac192354980665;p=~shefty%2Frdma-dev.git ASoC: omap-pcm: Free dma buffers in case of error. Signed-off-by: Oleg Matcovschi Acked-by: Peter Ujfalusi Acked-by: Jarkko Nikula Acked-by: Mark Brown Signed-off-by: Liam Girdwood --- diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c index a59bd352d34..5a649da9122 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) } out: + /* free preallocated buffers in case of error */ + if (ret) + omap_pcm_free_dma_buffers(pcm); + return ret; }