From: Peter Ujfalusi Date: Mon, 14 Dec 2015 20:47:38 +0000 (+0200) Subject: UPSTREAM: dmaengine: core: Skip mask matching when it is not provided to private_cand... X-Git-Tag: firefly_0821_release~2235 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=449ee854628fd71f0945dfd4ad28d80e937e7a64;p=firefly-linux-kernel-4.4.55.git UPSTREAM: dmaengine: core: Skip mask matching when it is not provided to private_candidate If mask is NULL skip the mask matching against the DMA device capabilities. Change-Id: Iee44026c8d43493e4e73d8d483545267dc2e08a7 Signed-off-by: Peter Ujfalusi Reviewed-by: Andy Shevchenko Reviewed-by: Arnd Bergmann Signed-off-by: Vinod Koul Signed-off-by: Caesar Wang (cherry picked from git.kernel.org next/linux-next.git master commit 26b64256e0c4573f3668ac8329a1266ebb9d6120) --- diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c index 6dbe777b04f5..002ed81c277b 100644 --- a/drivers/dma/dmaengine.c +++ b/drivers/dma/dmaengine.c @@ -515,7 +515,7 @@ static struct dma_chan *private_candidate(const dma_cap_mask_t *mask, { struct dma_chan *chan; - if (!__dma_device_satisfies_mask(dev, mask)) { + if (mask && !__dma_device_satisfies_mask(dev, mask)) { pr_debug("%s: wrong capabilities\n", __func__); return NULL; }