projects
/
linux-block.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
dmaengine: device must have at least one channel
[linux-block.git]
/
drivers
/
dma
/
dmaengine.c
diff --git
a/drivers/dma/dmaengine.c
b/drivers/dma/dmaengine.c
index 8c9f45fd55fc16b3527e256591383583a2490d80..6b535262ac5d76972bb525b49f3cf160fcf54aa0 100644
(file)
--- 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);