Skip to content

Commit

Permalink
ASoC: omap-pcm: Free dma buffers in case of error.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Oleg Matcovschi authored and Liam Girdwood committed May 4, 2012
1 parent 1a38336 commit fad9365
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sound/soc/omap/omap-pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit fad9365

Please sign in to comment.