Commit e1412e63 authored by Stephen Warren's avatar Stephen Warren Committed by Mark Brown

ASoC: Tegra: Fix error handling in DMA channel alloc

tegra_dma_allocate_channel() returns NULL on errors, not an error pointer.
Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
Acked-by: default avatarLiam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 61a142b7
...@@ -161,8 +161,8 @@ static int tegra_pcm_open(struct snd_pcm_substream *substream) ...@@ -161,8 +161,8 @@ static int tegra_pcm_open(struct snd_pcm_substream *substream)
prtd->dma_req[1].dev = prtd; prtd->dma_req[1].dev = prtd;
prtd->dma_chan = tegra_dma_allocate_channel(TEGRA_DMA_MODE_ONESHOT); prtd->dma_chan = tegra_dma_allocate_channel(TEGRA_DMA_MODE_ONESHOT);
if (IS_ERR(prtd->dma_chan)) { if (prtd->dma_chan == NULL) {
ret = PTR_ERR(prtd->dma_chan); ret = -ENOMEM;
goto err; goto err;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment