Commit 95e19633 authored by Saeed Mahameed's avatar Saeed Mahameed Committed by David S. Miller
Browse files

net/mlx4_core: Fix resource tracker error flow in add_res_range

The 'for' loop when undoing rb-tree insertions and list-adds in the
error flow in add_res_range had errors, fix them.
Signed-off-by: default avatarSaeed Mahameed <>
Signed-off-by: default avatarJack Morgenstein <>
Signed-off-by: default avatarOr Gerlitz <>
Signed-off-by: default avatarDavid S. Miller <>
parent a5b3c56e
......@@ -1238,8 +1238,10 @@ static int add_res_range(struct mlx4_dev *dev, int slave, u64 base, int count,
return 0;
for (--i; i >= base; --i)
for (--i; i >= 0; --i) {
rb_erase(&res_arr[i]->node, root);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment