aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/mlx4/mad.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband/hw/mlx4/mad.c')
-rw-r--r--drivers/infiniband/hw/mlx4/mad.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/mlx4/mad.c b/drivers/infiniband/hw/mlx4/mad.c
index cdca3a511e1c..606f1e2ef284 100644
--- a/drivers/infiniband/hw/mlx4/mad.c
+++ b/drivers/infiniband/hw/mlx4/mad.c
@@ -298,7 +298,7 @@ int mlx4_ib_mad_init(struct mlx4_ib_dev *dev)
298 int p, q; 298 int p, q;
299 int ret; 299 int ret;
300 300
301 for (p = 0; p < dev->dev->caps.num_ports; ++p) 301 for (p = 0; p < dev->num_ports; ++p)
302 for (q = 0; q <= 1; ++q) { 302 for (q = 0; q <= 1; ++q) {
303 agent = ib_register_mad_agent(&dev->ib_dev, p + 1, 303 agent = ib_register_mad_agent(&dev->ib_dev, p + 1,
304 q ? IB_QPT_GSI : IB_QPT_SMI, 304 q ? IB_QPT_GSI : IB_QPT_SMI,
@@ -314,7 +314,7 @@ int mlx4_ib_mad_init(struct mlx4_ib_dev *dev)
314 return 0; 314 return 0;
315 315
316err: 316err:
317 for (p = 0; p < dev->dev->caps.num_ports; ++p) 317 for (p = 0; p < dev->num_ports; ++p)
318 for (q = 0; q <= 1; ++q) 318 for (q = 0; q <= 1; ++q)
319 if (dev->send_agent[p][q]) 319 if (dev->send_agent[p][q])
320 ib_unregister_mad_agent(dev->send_agent[p][q]); 320 ib_unregister_mad_agent(dev->send_agent[p][q]);
@@ -327,7 +327,7 @@ void mlx4_ib_mad_cleanup(struct mlx4_ib_dev *dev)
327 struct ib_mad_agent *agent; 327 struct ib_mad_agent *agent;
328 int p, q; 328 int p, q;
329 329
330 for (p = 0; p < dev->dev->caps.num_ports; ++p) { 330 for (p = 0; p < dev->num_ports; ++p) {
331 for (q = 0; q <= 1; ++q) { 331 for (q = 0; q <= 1; ++q) {
332 agent = dev->send_agent[p][q]; 332 agent = dev->send_agent[p][q];
333 dev->send_agent[p][q] = NULL; 333 dev->send_agent[p][q] = NULL;