diff options
-rw-r--r-- | drivers/net/mlx4/mr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/mlx4/mr.c b/drivers/net/mlx4/mr.c index 5b87183e62ce..60a6ee27cfd4 100644 --- a/drivers/net/mlx4/mr.c +++ b/drivers/net/mlx4/mr.c | |||
@@ -444,7 +444,7 @@ int __devinit mlx4_init_mr_table(struct mlx4_dev *dev) | |||
444 | goto err_buddy; | 444 | goto err_buddy; |
445 | 445 | ||
446 | if (dev->caps.reserved_mtts) { | 446 | if (dev->caps.reserved_mtts) { |
447 | if (mlx4_alloc_mtt_range(dev, ilog2(dev->caps.reserved_mtts)) == -1) { | 447 | if (mlx4_alloc_mtt_range(dev, fls(dev->caps.reserved_mtts - 1)) == -1) { |
448 | mlx4_warn(dev, "MTT table of order %d is too small.\n", | 448 | mlx4_warn(dev, "MTT table of order %d is too small.\n", |
449 | mr_table->mtt_buddy.max_order); | 449 | mr_table->mtt_buddy.max_order); |
450 | err = -ENOMEM; | 450 | err = -ENOMEM; |