summaryrefslogtreecommitdiff
path: root/drivers/dma
diff options
context:
space:
mode:
authorVinod Koul <vinod.koul@intel.com>2016-10-03 06:46:13 +0300
committerVinod Koul <vinod.koul@intel.com>2016-10-03 06:46:13 +0300
commit99823374d326a12ee384a4ef26de75691bd1892d (patch)
treeb9c0ce4eddbd8539c116a980446754e17a03af92 /drivers/dma
parent6619f035a64dd44c7238b7341c138a3975d59111 (diff)
parent76d7b84bfa43f514544477d2282f9ac9796a2594 (diff)
downloadlinux-99823374d326a12ee384a4ef26de75691bd1892d.tar.xz
Merge branch 'topic/core' into for-linus
Diffstat (limited to 'drivers/dma')
-rw-r--r--drivers/dma/dmaengine.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c
index 8c9f45fd55fc..6b535262ac5d 100644
--- a/drivers/dma/dmaengine.c
+++ b/drivers/dma/dmaengine.c
@@ -997,6 +997,13 @@ int dma_async_device_register(struct dma_device *device)
}
chan->client_count = 0;
}
+
+ if (!chancnt) {
+ dev_err(device->dev, "%s: device has no channels!\n", __func__);
+ rc = -ENODEV;
+ goto err_out;
+ }
+
device->chancnt = chancnt;
mutex_lock(&dma_list_mutex);