diff options
-rw-r--r-- | drivers/infiniband/core/cm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c index 764787ebe8d8..c9730cb3f695 100644 --- a/drivers/infiniband/core/cm.c +++ b/drivers/infiniband/core/cm.c | |||
@@ -3693,7 +3693,7 @@ static void cm_add_one(struct ib_device *ib_device) | |||
3693 | cm_dev->device = device_create(&cm_class, &ib_device->dev, | 3693 | cm_dev->device = device_create(&cm_class, &ib_device->dev, |
3694 | MKDEV(0, 0), NULL, | 3694 | MKDEV(0, 0), NULL, |
3695 | "%s", ib_device->name); | 3695 | "%s", ib_device->name); |
3696 | if (!cm_dev->device) { | 3696 | if (IS_ERR(cm_dev->device)) { |
3697 | kfree(cm_dev); | 3697 | kfree(cm_dev); |
3698 | return; | 3698 | return; |
3699 | } | 3699 | } |