aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/infiniband/core/cm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c
index 922d35f4fc08..3cab0cedfca2 100644
--- a/drivers/infiniband/core/cm.c
+++ b/drivers/infiniband/core/cm.c
@@ -3748,6 +3748,7 @@ error1:
3748 cm_remove_port_fs(port); 3748 cm_remove_port_fs(port);
3749 } 3749 }
3750 device_unregister(cm_dev->device); 3750 device_unregister(cm_dev->device);
3751 kfree(cm_dev);
3751} 3752}
3752 3753
3753static void cm_remove_one(struct ib_device *ib_device) 3754static void cm_remove_one(struct ib_device *ib_device)
@@ -3776,6 +3777,7 @@ static void cm_remove_one(struct ib_device *ib_device)
3776 cm_remove_port_fs(port); 3777 cm_remove_port_fs(port);
3777 } 3778 }
3778 device_unregister(cm_dev->device); 3779 device_unregister(cm_dev->device);
3780 kfree(cm_dev);
3779} 3781}
3780 3782
3781static int __init ib_cm_init(void) 3783static int __init ib_cm_init(void)