Skip to content

Commit 5b4fa3b

Browse files
noglitchcristibirsan
authored andcommitted
dmaengine: at_xdmac: remove BUG_ON macro in tasklet
Even if this case shouldn't happen when controller is properly programmed, it's still better to avoid dumping a kernel Oops for this. As the sequence may happen only for debugging purposes, log the error and just finish the tasklet call. Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
1 parent 06fefe5 commit 5b4fa3b

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

drivers/dma/at_xdmac.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1606,7 +1606,11 @@ static void at_xdmac_tasklet(unsigned long data)
16061606
struct at_xdmac_desc,
16071607
xfer_node);
16081608
dev_vdbg(chan2dev(&atchan->chan), "%s: desc 0x%p\n", __func__, desc);
1609-
BUG_ON(!desc->active_xfer);
1609+
if (!desc->active_xfer) {
1610+
dev_err(chan2dev(&atchan->chan), "Xfer not active: exiting");
1611+
spin_unlock_bh(&atchan->lock);
1612+
return;
1613+
}
16101614

16111615
txd = &desc->tx_dma_desc;
16121616

0 commit comments

Comments
 (0)