aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/core/cm.c
diff options
context:
space:
mode:
authorJason Gunthorpe <jgg@mellanox.com>2019-10-28 16:36:29 -0300
committerJason Gunthorpe <jgg@mellanox.com>2019-10-28 16:36:29 -0300
commit036313316d3a38bfde9ba49b3d00f73b7d8019d2 (patch)
tree284127b68e10bd919adb420a5f37dc19d06532f6 /drivers/infiniband/core/cm.c
parentRDMA/vmw_pvrdma: Use resource ids from physical device if available (diff)
parentLinux 5.4-rc5 (diff)
downloadlinux-dev-036313316d3a38bfde9ba49b3d00f73b7d8019d2.tar.xz
linux-dev-036313316d3a38bfde9ba49b3d00f73b7d8019d2.zip
Merge tag 'v5.4-rc5' into rdma.git for-next
Linux 5.4-rc5 For dependencies in the next patches Conflict resolved by keeping the delete of the unlock. Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/core/cm.c')
-rw-r--r--drivers/infiniband/core/cm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c
index 7ffa16ea5fe3..33b384c7df42 100644
--- a/drivers/infiniband/core/cm.c
+++ b/drivers/infiniband/core/cm.c
@@ -4365,6 +4365,7 @@ error2:
error1:
port_modify.set_port_cap_mask = 0;
port_modify.clr_port_cap_mask = IB_PORT_CM_SUP;
+ kfree(port);
while (--i) {
if (!rdma_cap_ib_cm(ib_device, i))
continue;
@@ -4373,6 +4374,7 @@ error1:
ib_modify_port(ib_device, port->port_num, 0, &port_modify);
ib_unregister_mad_agent(port->mad_agent);
cm_remove_port_fs(port);
+ kfree(port);
}
free:
kfree(cm_dev);
@@ -4426,6 +4428,7 @@ static void cm_remove_one(struct ib_device *ib_device, void *client_data)
spin_unlock_irq(&cm.state_lock);
ib_unregister_mad_agent(cur_mad_agent);
cm_remove_port_fs(port);
+ kfree(port);
}
kfree(cm_dev);