Skip to content

Commit 86cb0de

Browse files
bjdooks-sifivevinodkoul
authored andcommitted
dmaengine: dw-axi-dmac: do not print NULL LLI during error
During debugging we have seen an issue where axi_chan_dump_lli() is passed a NULL LLI pointer which ends up causing an OOPS due to trying to get fields from it. Simply print NULL LLI and exit to avoid this. Signed-off-by: Ben Dooks <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 4348d99 commit 86cb0de

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -982,6 +982,11 @@ static int dw_axi_dma_chan_slave_config(struct dma_chan *dchan,
982982
static void axi_chan_dump_lli(struct axi_dma_chan *chan,
983983
struct axi_dma_hw_desc *desc)
984984
{
985+
if (!desc->lli) {
986+
dev_err(dchan2dev(&chan->vc.chan), "NULL LLI\n");
987+
return;
988+
}
989+
985990
dev_err(dchan2dev(&chan->vc.chan),
986991
"SAR: 0x%llx DAR: 0x%llx LLP: 0x%llx BTS 0x%x CTL: 0x%x:%08x",
987992
le64_to_cpu(desc->lli->sar),

0 commit comments

Comments
 (0)