RDMA/nes: Fix resource issues in nes_create_cq() and nes_destroy_cq()
authorMiroslaw Walukiewicz <miroslaw.walukiewicz@intel.com>
Tue, 21 Apr 2009 23:16:48 +0000 (16:16 -0700)
committerRoland Dreier <rolandd@cisco.com>
Tue, 21 Apr 2009 23:16:48 +0000 (16:16 -0700)
commit5d1af5c83232c5a02b9dc0fe43053b4ddc005224
tree705fa258b696855d355fa8ebf2af84ced5f3fa29
parentcc005fa20c5229c283bea4958869da1e3c8a3720
RDMA/nes: Fix resource issues in nes_create_cq() and nes_destroy_cq()

In error paths where a CQ is not created, pbl is not freeed properly.

In nes_destroy_cq(), add the corresponding check for nescq->mcrqf to
not call nes_free_resource() when it is already done in nes_create_cq().

Signed-off-by: Miroslaw Walukiewicz <miroslaw.walukiewicz@intel.com>
Signed-off-by: Chien Tung <chien.tin.tung@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/hw/nes/nes_verbs.c
drivers/infiniband/hw/nes/nes_verbs.h