diff options
author | 2016-10-03 09:16:13 +0530 | |
---|---|---|
committer | 2016-10-03 09:16:13 +0530 | |
commit | 99823374d326a12ee384a4ef26de75691bd1892d (patch) | |
tree | b9c0ce4eddbd8539c116a980446754e17a03af92 | |
parent | Merge branch 'topic/compile_test' into for-linus (diff) | |
parent | dmaengine: device must have at least one channel (diff) | |
download | wireguard-linux-99823374d326a12ee384a4ef26de75691bd1892d.tar.xz wireguard-linux-99823374d326a12ee384a4ef26de75691bd1892d.zip |
Merge branch 'topic/core' into for-linus
Diffstat (limited to '')
-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); |