diff options
author | Vinod Koul <vinod.koul@intel.com> | 2016-10-02 23:46:13 -0400 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2016-10-02 23:46:13 -0400 |
commit | 99823374d326a12ee384a4ef26de75691bd1892d (patch) | |
tree | b9c0ce4eddbd8539c116a980446754e17a03af92 | |
parent | 6619f035a64dd44c7238b7341c138a3975d59111 (diff) | |
parent | 76d7b84bfa43f514544477d2282f9ac9796a2594 (diff) |
Merge branch 'topic/core' into for-linus
-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) | |||
997 | } | 997 | } |
998 | chan->client_count = 0; | 998 | chan->client_count = 0; |
999 | } | 999 | } |
1000 | |||
1001 | if (!chancnt) { | ||
1002 | dev_err(device->dev, "%s: device has no channels!\n", __func__); | ||
1003 | rc = -ENODEV; | ||
1004 | goto err_out; | ||
1005 | } | ||
1006 | |||
1000 | device->chancnt = chancnt; | 1007 | device->chancnt = chancnt; |
1001 | 1008 | ||
1002 | mutex_lock(&dma_list_mutex); | 1009 | mutex_lock(&dma_list_mutex); |