Merge tag 'for-linus-unmerged' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma...
[muen/linux.git] / drivers / infiniband / hw / hns / hns_roce_hw_v2.c
index 684c2d1..8b84ab7 100644 (file)
@@ -4391,7 +4391,7 @@ err_dma_alloc_buf:
        eq->l0_dma = 0;
 
        if (mhop_num == 1)
-               for (i -= i; i >= 0; i--)
+               for (i -= 1; i >= 0; i--)
                        dma_free_coherent(dev, buf_chk_sz, eq->buf[i],
                                          eq->buf_dma[i]);
        else if (mhop_num == 2) {