Skip to content

Commit

Permalink
IB/mlx5: Remove dead code from alloc_cached_mr()
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
rolandd authored and dledford committed Aug 29, 2015
1 parent d6f1c17 commit d6c7276
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions drivers/infiniband/hw/mlx5/mr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d6c7276

Please sign in to comment.