diff options
author | Vinod Koul | 2016-10-03 09:16:13 +0530 |
---|---|---|
committer | Vinod Koul | 2016-10-03 09:16:13 +0530 |
commit | 99823374d326a12ee384a4ef26de75691bd1892d (patch) | |
tree | b9c0ce4eddbd8539c116a980446754e17a03af92 /drivers/dma | |
parent | 6619f035a64dd44c7238b7341c138a3975d59111 (diff) | |
parent | 76d7b84bfa43f514544477d2282f9ac9796a2594 (diff) |
Merge branch 'topic/core' into for-linus
Diffstat (limited to 'drivers/dma')
-rw-r--r-- | drivers/dma/dmaengine.c | 7 |
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); |