summaryrefslogtreecommitdiffstats
path: root/drivers/dma/zx_dma.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/dma/zx_dma.c')
-rw-r--r--drivers/dma/zx_dma.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/dma/zx_dma.c b/drivers/dma/zx_dma.c
index 33155c6816cc..42ff3e66c1e1 100644
--- a/drivers/dma/zx_dma.c
+++ b/drivers/dma/zx_dma.c
@@ -365,7 +365,8 @@ static enum dma_status zx_dma_tx_status(struct dma_chan *chan,
bytes = 0;
clli = zx_dma_get_curr_lli(p);
- index = (clli - ds->desc_hw_lli) / sizeof(struct zx_desc_hw);
+ index = (clli - ds->desc_hw_lli) /
+ sizeof(struct zx_desc_hw) + 1;
for (; index < ds->desc_num; index++) {
bytes += ds->desc_hw[index].src_x;
/* end of lli */