IB/hns: Fix bug of using uninit refcount and free
authorLijun Ou <oulijun@huawei.com>
Tue, 20 Sep 2016 16:06:56 +0000 (17:06 +0100)
committerDoug Ledford <dledford@redhat.com>
Mon, 3 Oct 2016 15:43:15 +0000 (11:43 -0400)
commited3e6d01138eb26634abb519bc66e0b0dc473d0e
treec72e39551c60eb42ae188a0080d9bf1035ec19e2
parent622b85f9f7fbe1255649894d03e9e077b1a97e6c
IB/hns: Fix bug of using uninit refcount and free

In current version, it uses uninitialized parameters named
refcount and free in hns_roce_cq_event.
This patch initializes these parameter in cq alloc and add
correspond process in cq free.

Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Dongdong Huang(Donald) <hdd.huang@huawei.com>
Reviewed-by: Wei Hu <xavier.huwei@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/hns/hns_roce_cq.c