RDMA/hns: Release qp resources when failed to destroy qp
authorYangyang Li <liyangyang20@huawei.com>
Wed, 9 Oct 2019 01:21:50 +0000 (09:21 +0800)
committerDoug Ledford <dledford@redhat.com>
Mon, 21 Oct 2019 19:45:22 +0000 (15:45 -0400)
commitd302c6e3a6895608a5856bc708c47bda1770b24d
treef5d345c19299f33a3a3391f4692028cfcae4362d
parent3dcad1f8421f5684c64ef3079c32dfb884a3b910
RDMA/hns: Release qp resources when failed to destroy qp

Even if no response from hardware, we should make sure that qp related
resources are released to avoid memory leaks.

Fixes: 926a01dc000d ("RDMA/hns: Add QP operations support for hip08 SoC")
Signed-off-by: Yangyang Li <liyangyang20@huawei.com>
Signed-off-by: Weihang Li <liweihang@hisilicon.com>
Link: https://lore.kernel.org/r/1570584110-3659-1-git-send-email-liweihang@hisilicon.com
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/hns/hns_roce_hw_v2.c