diff options
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/core/user_mad.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/core/user_mad.c b/drivers/infiniband/core/user_mad.c index aed5ca23fb22..6aefeed42ab3 100644 --- a/drivers/infiniband/core/user_mad.c +++ b/drivers/infiniband/core/user_mad.c | |||
@@ -801,7 +801,7 @@ static int ib_umad_init_port(struct ib_device *device, int port_num, | |||
801 | goto err_class; | 801 | goto err_class; |
802 | port->sm_dev->owner = THIS_MODULE; | 802 | port->sm_dev->owner = THIS_MODULE; |
803 | port->sm_dev->ops = &umad_sm_fops; | 803 | port->sm_dev->ops = &umad_sm_fops; |
804 | kobject_set_name(&port->dev->kobj, "issm%d", port->dev_num); | 804 | kobject_set_name(&port->sm_dev->kobj, "issm%d", port->dev_num); |
805 | if (cdev_add(port->sm_dev, base_dev + port->dev_num + IB_UMAD_MAX_PORTS, 1)) | 805 | if (cdev_add(port->sm_dev, base_dev + port->dev_num + IB_UMAD_MAX_PORTS, 1)) |
806 | goto err_sm_cdev; | 806 | goto err_sm_cdev; |
807 | 807 | ||
@@ -913,7 +913,7 @@ static void ib_umad_add_one(struct ib_device *device) | |||
913 | 913 | ||
914 | err: | 914 | err: |
915 | while (--i >= s) | 915 | while (--i >= s) |
916 | ib_umad_kill_port(&umad_dev->port[i]); | 916 | ib_umad_kill_port(&umad_dev->port[i - s]); |
917 | 917 | ||
918 | kref_put(&umad_dev->ref, ib_umad_release_dev); | 918 | kref_put(&umad_dev->ref, ib_umad_release_dev); |
919 | } | 919 | } |