aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorRoland Dreier <roland@purestorage.com>2015-07-27 14:43:23 -0700
committerDoug Ledford <dledford@redhat.com>2015-08-28 22:54:47 -0400
commitd6c7276be180fbd0a30cda8fac5c82d483be47b6 (patch)
tree7eebccae134bf571ce53f8b9911e6d3fbc01cf15 /drivers/infiniband
parentIB/qib: Change lkey table allocation to support more MRs (diff)
downloadlinux-dev-d6c7276be180fbd0a30cda8fac5c82d483be47b6.tar.xz
linux-dev-d6c7276be180fbd0a30cda8fac5c82d483be47b6.zip
IB/mlx5: Remove dead code from alloc_cached_mr()
The only place that assigns mr inside the loop already does a break. So "if (mr)" will never be true here since the function initializes mr to NULL at the top. We can just drop the extra if and break here. Signed-off-by: Roland Dreier <roland@purestorage.com> Acked-by: Eli Cohen <eli@mellanox.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/hw/mlx5/mr.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/mlx5/mr.c b/drivers/infiniband/hw/mlx5/mr.c
index bc9a0de897cb..10d2b213a4d8 100644
--- a/drivers/infiniband/hw/mlx5/mr.c
+++ b/drivers/infiniband/hw/mlx5/mr.c
@@ -441,9 +441,6 @@ static struct mlx5_ib_mr *alloc_cached_mr(struct mlx5_ib_dev *dev, int order)
spin_unlock_irq(&ent->lock);
queue_work(cache->wq, &ent->work);
-
- if (mr)
- break;
}
if (!mr)