2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-21 11:44:01 +08:00

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>
This commit is contained in:
Mark Brown 2013-08-19 20:33:20 +01:00
parent 6418365688
commit 37e6071787

View File

@ -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);
}