aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/mlx4/icm.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/mlx4/icm.c')
-rw-r--r--drivers/net/mlx4/icm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/mlx4/icm.c b/drivers/net/mlx4/icm.c
index 57288ca1395f..ef62f1749b8a 100644
--- a/drivers/net/mlx4/icm.c
+++ b/drivers/net/mlx4/icm.c
@@ -175,9 +175,10 @@ struct mlx4_icm *mlx4_alloc_icm(struct mlx4_dev *dev, int npages,
175 175
176 if (chunk->nsg <= 0) 176 if (chunk->nsg <= 0)
177 goto fail; 177 goto fail;
178 }
178 179
180 if (chunk->npages == MLX4_ICM_CHUNK_LEN)
179 chunk = NULL; 181 chunk = NULL;
180 }
181 182
182 npages -= 1 << cur_order; 183 npages -= 1 << cur_order;
183 } else { 184 } else {