Skip to content

Commit 4719d4b

Browse files
lkundrakvinodkoul
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 0d8173f commit 4719d4b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/dma/mmp_tdma.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,8 +427,10 @@ static struct dma_async_tx_descriptor *mmp_tdma_prep_dma_cyclic(
427427
int num_periods = buf_len / period_len;
428428
int i = 0, buf = 0;
429429

430-
if (tdmac->status != DMA_COMPLETE)
430+
if (tdmac->status != DMA_COMPLETE) {
431+
dev_err(tdmac->dev, "controller busy");
431432
return NULL;
433+
}
432434

433435
if (period_len > TDMA_MAX_XFER_BYTES) {
434436
dev_err(tdmac->dev,

0 commit comments

Comments
 (0)