diff options
author | Stephen Warren <swarren@nvidia.com> | 2011-02-22 22:16:34 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-02-28 10:10:03 -0500 |
commit | e1412e636eeb84023b79e525909b366a9b28a185 (patch) | |
tree | c6be48658187a644a4b82cfb4a401e069f585fff /sound/soc/tegra | |
parent | 61a142b7e4b5c4cce1b4ea52a829984959120089 (diff) |
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 <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/tegra')
-rw-r--r-- | sound/soc/tegra/tegra_pcm.c | 4 |
1 files changed, 2 insertions, 2 deletions
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) | |||
161 | prtd->dma_req[1].dev = prtd; | 161 | prtd->dma_req[1].dev = prtd; |
162 | 162 | ||
163 | prtd->dma_chan = tegra_dma_allocate_channel(TEGRA_DMA_MODE_ONESHOT); | 163 | prtd->dma_chan = tegra_dma_allocate_channel(TEGRA_DMA_MODE_ONESHOT); |
164 | if (IS_ERR(prtd->dma_chan)) { | 164 | if (prtd->dma_chan == NULL) { |
165 | ret = PTR_ERR(prtd->dma_chan); | 165 | ret = -ENOMEM; |
166 | goto err; | 166 | goto err; |
167 | } | 167 | } |
168 | 168 | ||