diff options
author | Mark Brown <broonie@linaro.org> | 2013-08-19 20:33:20 +0100 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-08-20 10:36:00 +0100 |
commit | 37e6071787908fa9009cbd002c86402720becc5f (patch) | |
tree | 10082805613bcd8da23d2a242e6dcdf7edf0cfa5 /sound/soc/samsung | |
parent | 6418365688844125441d8df19fa65ebe2a49af53 (diff) |
ASoC: samsung: Check to see if we managed to allocate a channel
Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Sangbeom Kim <sbkim73@samsung.com>
Diffstat (limited to 'sound/soc/samsung')
-rw-r--r-- | sound/soc/samsung/dma.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/soc/samsung/dma.c b/sound/soc/samsung/dma.c index 21b79262010e..50c1eb669e90 100644 --- a/sound/soc/samsung/dma.c +++ b/sound/soc/samsung/dma.c @@ -176,6 +176,10 @@ static int dma_hw_params(struct snd_pcm_substream *substream, prtd->params->ch = prtd->params->ops->request( prtd->params->channel, &req, rtd->cpu_dai->dev, prtd->params->ch_name); + if (!prtd->params->ch) { + pr_err("Failed to allocate DMA channel\n"); + return -ENXIO; + } prtd->params->ops->config(prtd->params->ch, &config); } |