From: Stephen Warren Date: Wed, 11 Dec 2013 18:20:50 +0000 (-0700) Subject: ASoC: dmaengine: fix deferred probe detection X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e9036c2a60f368b8ddc349fbbcde918ed32ab597;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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: kbuild test robot Fixes: 5eda87b890f8 ("ASoC: dmaengine: support deferred probe for DMA channels") Signed-off-by: Stephen Warren Signed-off-by: Mark Brown --- diff --git a/sound/soc/soc-generic-dmaengine-pcm.c b/sound/soc/soc-generic-dmaengine-pcm.c index 585eaa69e8c3..7483922f6ee3 100644 --- a/sound/soc/soc-generic-dmaengine-pcm.c +++ b/sound/soc/soc-generic-dmaengine-pcm.c @@ -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 {