ASoC: imx-pcm-dma: open function failed when snd_dmaengine_pcm_open fail
authorRichard Zhao <richard.zhao@freescale.com>
Tue, 18 Sep 2012 09:20:06 +0000 (17:20 +0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 19 Sep 2012 02:52:43 +0000 (22:52 -0400)
snd_imx_open should return error code returned by snd_dmaengine_pcm_open.

Signed-off-by: Richard Zhao <richard.zhao@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/fsl/imx-pcm-dma.c

index a23505a9ae64788c0986e53ecd728a05b192b7e1..9a15bc4bd570b9bfa8d94eeb2d91e562fbb1a025 100644 (file)
@@ -120,7 +120,7 @@ static int snd_imx_open(struct snd_pcm_substream *substream)
        ret = snd_dmaengine_pcm_open(substream, filter, dma_data);
        if (ret) {
                kfree(dma_data);
-               return 0;
+               return ret;
        }
 
        snd_dmaengine_pcm_set_data(substream, dma_data);