提交 e9036c2a 编写于 作者: S Stephen Warren 提交者: Mark Brown

ASoC: dmaengine: fix deferred probe detection

Check the return value of dma_request_slave_channel_reason() to see if
deferred probe happens, not the variable the return value will be
assigned to later.
Reported-by: Nkbuild test robot <fengguang.wu@intel.com>
Fixes: 5eda87b8 ("ASoC: dmaengine: support deferred probe for DMA channels")
Signed-off-by: NStephen Warren <swarren@nvidia.com>
Signed-off-by: NMark Brown <broonie@linaro.org>
上级 5eda87b8
......@@ -321,7 +321,7 @@ static int dmaengine_pcm_request_chan_of(struct dmaengine_pcm *pcm,
name = config->chan_names[i];
chan = dma_request_slave_channel_reason(dev, name);
if (IS_ERR(chan)) {
if (PTR_ERR(pcm->chan[i]) == -EPROBE_DEFER)
if (PTR_ERR(chan) == -EPROBE_DEFER)
return -EPROBE_DEFER;
pcm->chan[i] = NULL;
} else {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册