diff options
author | Michael S. Tsirkin <mst@mellanox.co.il> | 2005-11-06 15:47:02 -0800 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2005-11-06 15:47:02 -0800 |
commit | 8b37b94721533f2729c79bcb6fa0bb3e2bc2f400 (patch) | |
tree | f681c9c9ea858c5b14f593077e7cadf9e93ad255 /drivers/infiniband | |
parent | 0f69ce1e4474e5d5e266457e8a1f4166cf71f6c7 (diff) | |
download | op-kernel-dev-8b37b94721533f2729c79bcb6fa0bb3e2bc2f400.zip op-kernel-dev-8b37b94721533f2729c79bcb6fa0bb3e2bc2f400.tar.gz |
[IB] umad: two small fixes
Two small fixes for the umad module:
- set kobject name for issm device properly
- in ib_umad_add_one(), s is subtracted from the index i when
initializing ports, so s should be subtracted from the index when
freeing ports in the error path as well.
Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
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 aed5ca2..6aefeed 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, goto err_class; port->sm_dev->owner = THIS_MODULE; port->sm_dev->ops = &umad_sm_fops; - kobject_set_name(&port->dev->kobj, "issm%d", port->dev_num); + kobject_set_name(&port->sm_dev->kobj, "issm%d", port->dev_num); if (cdev_add(port->sm_dev, base_dev + port->dev_num + IB_UMAD_MAX_PORTS, 1)) goto err_sm_cdev; @@ -913,7 +913,7 @@ static void ib_umad_add_one(struct ib_device *device) err: while (--i >= s) - ib_umad_kill_port(&umad_dev->port[i]); + ib_umad_kill_port(&umad_dev->port[i - s]); kref_put(&umad_dev->ref, ib_umad_release_dev); } |