RDMA/nes: Avoid memory allocation during CQ destroy
authorLeon Romanovsky <leonro@mellanox.com>
Tue, 28 May 2019 11:37:27 +0000 (14:37 +0300)
committerDoug Ledford <dledford@redhat.com>
Tue, 11 Jun 2019 20:12:34 +0000 (16:12 -0400)
commit147b308e6a63a0572b750b1dc9b8b6fc33997e4b
tree4eb3502ef1d3e856e82d8449c5db7e5a2f7732c5
parent7a15414252ae4f1d450462d83f883b2d9d8036ee
RDMA/nes: Avoid memory allocation during CQ destroy

The memory allocation call can fail and cause to early return
from nes_desotroy_cq() function. This situation will cause to
memory leak of struct nes_cq. Rewrite function to avoid memory
allocation.

Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/nes/nes_verbs.c