提交 e1412e63 编写于 作者: S Stephen Warren 提交者: 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: NStephen Warren <swarren@nvidia.com>
Acked-by: NLiam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
上级 61a142b7
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册