From: Stephen Warren Date: Wed, 23 Feb 2011 03:16:34 +0000 (-0700) Subject: ASoC: Tegra: Fix error handling in DMA channel alloc X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=e1412e636eeb84023b79e525909b366a9b28a185;p=linux-beck.git ASoC: Tegra: Fix error handling in DMA channel alloc tegra_dma_allocate_channel() returns NULL on errors, not an error pointer. Signed-off-by: Stephen Warren Acked-by: Liam Girdwood Signed-off-by: Mark Brown --- diff --git a/sound/soc/tegra/tegra_pcm.c b/sound/soc/tegra/tegra_pcm.c index 40540b175f5e..3c271f953582 100644 --- a/sound/soc/tegra/tegra_pcm.c +++ b/sound/soc/tegra/tegra_pcm.c @@ -161,8 +161,8 @@ static int tegra_pcm_open(struct snd_pcm_substream *substream) prtd->dma_req[1].dev = prtd; prtd->dma_chan = tegra_dma_allocate_channel(TEGRA_DMA_MODE_ONESHOT); - if (IS_ERR(prtd->dma_chan)) { - ret = PTR_ERR(prtd->dma_chan); + if (prtd->dma_chan == NULL) { + ret = -ENOMEM; goto err; }