Hi,

On Thu, Apr 19, 2012 at 3:37 AM, Oleg Matcovschi <oleg.matcovs...@ti.com> wrote:
> Signed-off-by: Oleg Matcovschi <oleg.matcovs...@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.ujfal...@ti.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to