RDMA/qedr: Fix and simplify memory leak in PD alloc
authorRam Amrani <Ram.Amrani@Cavium.com>
Tue, 24 Jan 2017 11:51:42 +0000 (13:51 +0200)
committerDoug Ledford <dledford@redhat.com>
Tue, 24 Jan 2017 20:35:07 +0000 (15:35 -0500)
commit9c1e0228ab35e52d30abf4b5629c28350833fbcb
treece82f7a64535c16e17cee5cef17a63a1de129c6e
parentaf2b14b8b8ae21b0047a52c767ac8b44f435a280
RDMA/qedr: Fix and simplify memory leak in PD alloc

Free the PD if no internal resources were available. Move userspace
code under the relevant 'if'.

Signed-off-by: Ram Amrani <Ram.Amrani@cavium.com>
Signed-off-by: Ariel Elior <Ariel.Elior@cavium.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/qedr/verbs.c