提交 d6c7276b 编写于 作者: R Roland Dreier 提交者: Doug Ledford

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: NRoland Dreier <roland@purestorage.com>
Acked-by: NEli Cohen  <eli@mellanox.com>
Signed-off-by: NDoug Ledford <dledford@redhat.com>
上级 d6f1c17e
...@@ -441,9 +441,6 @@ static struct mlx5_ib_mr *alloc_cached_mr(struct mlx5_ib_dev *dev, int order) ...@@ -441,9 +441,6 @@ static struct mlx5_ib_mr *alloc_cached_mr(struct mlx5_ib_dev *dev, int order)
spin_unlock_irq(&ent->lock); spin_unlock_irq(&ent->lock);
queue_work(cache->wq, &ent->work); queue_work(cache->wq, &ent->work);
if (mr)
break;
} }
if (!mr) if (!mr)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册