]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/hns: ensure for-loop actually iterates and free's buffers
authorColin Ian King <colin.king@canonical.com>
Mon, 26 Mar 2018 15:10:18 +0000 (16:10 +0100)
committerJason Gunthorpe <jgg@mellanox.com>
Tue, 27 Mar 2018 21:06:34 +0000 (15:06 -0600)
commit38405e93b0f4459a5c0ab4593960e539e5182a7e
treea10f907656d5df8f4fb922e1a53b6e0888b47a95
parentc51ee467d9e9e1ffcad37888aaa7a3e990c9f2c0
RDMA/hns: ensure for-loop actually iterates and free's buffers

The current for-loop zeros variable i and only loops once, hence
not all the buffers are free'd.  Fix this by setting i correctly.

Detected by CoverityScan, CID#1463415 ("Operands don't affect result")

Fixes: 4ce7b0507c02 ("RDMA/hns: Add eq support of hip08")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Yixian Liu <liuyixian@huawei.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/hns/hns_roce_hw_v2.c