Skip to content

Commit d6c7276

Browse files
rolandddledford
authored andcommitted
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 <[email protected]> Acked-by: Eli Cohen <[email protected]> Signed-off-by: Doug Ledford <[email protected]>
1 parent d6f1c17 commit d6c7276

File tree

1 file changed

+0
-3
lines changed
  • drivers/infiniband/hw/mlx5

1 file changed

+0
-3
lines changed

drivers/infiniband/hw/mlx5/mr.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -441,9 +441,6 @@ static struct mlx5_ib_mr *alloc_cached_mr(struct mlx5_ib_dev *dev, int order)
441441
spin_unlock_irq(&ent->lock);
442442

443443
queue_work(cache->wq, &ent->work);
444-
445-
if (mr)
446-
break;
447444
}
448445

449446
if (!mr)

0 commit comments

Comments
 (0)