Re: [alsa-devel] [PATCH] ASoC: omap-pcm: Free dma buffers in case of error.
Hi,
On Thu, Apr 19, 2012 at 3:37 AM, Oleg Matcovschi oleg.matcovschi@ti.com wrote:
Signed-off-by: Oleg Matcovschi oleg.matcovschi@ti.com
sound/soc/omap/omap-pcm.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c index a2a464f..380a5bd 100644 --- a/sound/soc/omap/omap-pcm.c +++ b/sound/soc/omap/omap-pcm.c @@ -414,6 +414,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);
If the playback preallocation fails, or if only capture is supported on the dai link this is not needed. It only applies if we have both playback and capture streams and the capture preallocation fails. Luckily the omap_pcm_free_dma_buffers() has internal checks for these cases...
Acked-by: Peter Ujfalusi peter.ujfalusi@ti.com
On Thu, Apr 19, 2012 at 07:00:55PM +0300, Ujfalusi, Peter wrote:
If the playback preallocation fails, or if only capture is supported on the dai link this is not needed. It only applies if we have both playback and capture streams and the capture preallocation fails. Luckily the omap_pcm_free_dma_buffers() has internal checks for these cases...
Acked-by: Peter Ujfalusi peter.ujfalusi@ti.com
Always CC maintainers on patches...
participants (2)
-
Mark Brown
-
Ujfalusi, Peter