Commit 99823374 authored by Vinod Koul's avatar Vinod Koul

Merge branch 'topic/core' into for-linus

parents 6619f035 76d7b84b
...@@ -997,6 +997,13 @@ int dma_async_device_register(struct dma_device *device) ...@@ -997,6 +997,13 @@ int dma_async_device_register(struct dma_device *device)
} }
chan->client_count = 0; 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; device->chancnt = chancnt;
mutex_lock(&dma_list_mutex); mutex_lock(&dma_list_mutex);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment