@@ -4431,7 +4431,6 @@ static void cm_add_one(struct ib_device *ib_device)
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;
@@ -4440,7 +4439,6 @@ static void cm_add_one(struct ib_device *ib_device)
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:
device_unregister(cm_dev->device);
@@ -4495,7 +4493,6 @@ 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);
}
device_unregister(cm_dev->device);
BugLink: https://bugs.launchpad.net/bugs/1859582 This reverts commit f56d075cabc10ddbcfc1bf2c8291c46995176a86. cm_remove_port_fs() in 5.0 doesn't behave as in upstream and the additional kfree(port) is not necessary. Signed-off-by: Marcelo Henrique Cerri <marcelo.cerri@canonical.com> --- drivers/infiniband/core/cm.c | 3 --- 1 file changed, 3 deletions(-)