aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/dma/ste_dma40.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c
index 4ec96ac1e41..b8cce85a955 100644
--- a/drivers/dma/ste_dma40.c
+++ b/drivers/dma/ste_dma40.c
@@ -538,6 +538,10 @@ static void d40_log_lli_to_lcxa(struct d40_chan *chan, struct d40_desc *desc)
538 curr_lcla); 538 curr_lcla);
539 539
540 lli_current++; 540 lli_current++;
541
542 if (curr_lcla < 0)
543 goto out;
544
541 for (; lli_current < lli_len; lli_current++) { 545 for (; lli_current < lli_len; lli_current++) {
542 unsigned int lcla_offset = chan->phy_chan->num * 1024 + 546 unsigned int lcla_offset = chan->phy_chan->num * 1024 +
543 8 * curr_lcla * 2; 547 8 * curr_lcla * 2;
@@ -567,6 +571,7 @@ static void d40_log_lli_to_lcxa(struct d40_chan *chan, struct d40_desc *desc)
567 } 571 }
568 } 572 }
569 573
574out:
570 desc->lli_current = lli_current; 575 desc->lli_current = lli_current;
571} 576}
572 577