ASoC: spear_pcm: Use devm_snd_dmaengine_pcm_register to fix resource leak
authorAxel Lin <axel.lin@ingics.com>
Sun, 30 Aug 2015 00:08:15 +0000 (08:08 +0800)
committerMark Brown <broonie@kernel.org>
Sun, 30 Aug 2015 11:13:00 +0000 (12:13 +0100)
All the callers assume devm_spear_pcm_platform_register is a devm_ API, so
use devm_snd_dmaengine_pcm_register in devm_spear_pcm_platform_register.

Fixes: e1771bcf99b0 ("ASoC: SPEAr: remove custom DMA alloc compat function")
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/spear/spear_pcm.c

index a7dc3c56f44d95cfc611ca27975bf43349f90ca1..e8476da157cd2eda80cc2e572802a72d6a7368ce 100644 (file)
@@ -44,7 +44,7 @@ int devm_spear_pcm_platform_register(struct device *dev,
        *config = spear_dmaengine_pcm_config;
        config->compat_filter_fn = filter;
 
-       return snd_dmaengine_pcm_register(dev, config,
+       return devm_snd_dmaengine_pcm_register(dev, config,
                SND_DMAENGINE_PCM_FLAG_NO_DT |
                SND_DMAENGINE_PCM_FLAG_COMPAT);
 }