Skip to content

Commit

Permalink
ASoC: dmaengine: fix deferred probe detection
Browse files Browse the repository at this point in the history
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: kbuild test robot <fengguang.wu@intel.com>
Fixes: 5eda87b ("ASoC: dmaengine: support deferred probe for DMA channels")
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
  • Loading branch information
Stephen Warren authored and Mark Brown committed Dec 11, 2013
1 parent 5eda87b commit e9036c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/soc/soc-generic-dmaengine-pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit e9036c2

Please sign in to comment.