RDMA/nes: Fix error path in nes_accept()
authorFaisal Latif <faisal.latif@intel.com>
Mon, 27 Apr 2009 20:45:19 +0000 (13:45 -0700)
committerRoland Dreier <rolandd@cisco.com>
Mon, 27 Apr 2009 20:45:19 +0000 (13:45 -0700)
commit9256b2513074164b4555617c4a3b82d36abf03e5
treeffccbec443c56132035336ef80f65759947beb62
parent109d67e4f12b828113ca8ccf4a735972dd984f40
RDMA/nes: Fix error path in nes_accept()

If reg_phys_mem() fails, we need to free memory allocated for MPA
frame with private data before returning the error. Also move
nes_add_ref() after the reg_phys_mem() is successful.

Signed-off-by: Faisal Latif <faisal.latif@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/hw/nes/nes_cm.c