dmaengine: core: Skip mask matching when it is not provided to private_candidate
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Mon, 14 Dec 2015 20:47:38 +0000 (22:47 +0200)
committerVinod Koul <vinod.koul@intel.com>
Fri, 18 Dec 2015 05:47:26 +0000 (11:17 +0530)
If mask is NULL skip the mask matching against the DMA device capabilities.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/dmaengine.c

index 3ecec1445adfc9d76408fd88fb55ed5c8b79d98c..f2cbff95b56ef831ffb85c1e41f5657740d99084 100644 (file)
@@ -511,7 +511,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;
        }