Skip to contentSkip to conversation

ASoC: dmaengine: fix deferred probe detection

PATCH Applied Stephen Warren 2 participants 2 messages Dec 11, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

Fixes 5eda87b890f8 ("ASoC: dmaengine: support deferred probe for DMA channels")
---
 sound/soc/soc-generic-dmaengine-pcm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/soc-generic-dmaengine-pcm.c +1 -1
index 585eaa69e8c3..7483922f6ee3 100644
@@ -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 {
Signature · 1 line
1.8.1.5
maintainer Applied
#1 lore raw
Quoted 3 lines · Stephen Warren

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.

Applied, thanks.