aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2020-04-19 18:49:10 +0200
committerVinod Koul <vkoul@kernel.org>2020-04-23 12:45:10 +0530
commit4719d4b71562182dcb86401898b0ee205ea28ee1 (patch)
tree2c9b1edf82c1ccc5473244918d3156998a544ad0 /drivers/dma
parentdmaengine: mmp_tdma: Drop "mmp_tdma: from error messages (diff)
downloadlinux-dev-4719d4b71562182dcb86401898b0ee205ea28ee1.tar.xz
linux-dev-4719d4b71562182dcb86401898b0ee205ea28ee1.zip
dmaengine: mmp_tdma: Log an error if channel is in wrong state
Let's log an error if the channel can't be prepared because it is in an unexpected state. Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> Link: https://lore.kernel.org/r/20200419164912.670973-6-lkundrak@v3.sk Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/dma')
-rw-r--r--drivers/dma/mmp_tdma.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/dma/mmp_tdma.c b/drivers/dma/mmp_tdma.c
index fa00665efd9d..1597f6ebf335 100644
--- a/drivers/dma/mmp_tdma.c
+++ b/drivers/dma/mmp_tdma.c
@@ -427,8 +427,10 @@ static struct dma_async_tx_descriptor *mmp_tdma_prep_dma_cyclic(
int num_periods = buf_len / period_len;
int i = 0, buf = 0;
- if (tdmac->status != DMA_COMPLETE)
+ if (tdmac->status != DMA_COMPLETE) {
+ dev_err(tdmac->dev, "controller busy");
return NULL;
+ }
if (period_len > TDMA_MAX_XFER_BYTES) {
dev_err(tdmac->dev,