diff options
Diffstat (limited to 'drivers/net/mlx4/alloc.c')
-rw-r--r-- | drivers/net/mlx4/alloc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/mlx4/alloc.c b/drivers/net/mlx4/alloc.c index 8c8515619b8e..537997f9443e 100644 --- a/drivers/net/mlx4/alloc.c +++ b/drivers/net/mlx4/alloc.c | |||
@@ -188,7 +188,7 @@ int mlx4_buf_alloc(struct mlx4_dev *dev, int size, int max_direct, | |||
188 | buf->nbufs = (size + PAGE_SIZE - 1) / PAGE_SIZE; | 188 | buf->nbufs = (size + PAGE_SIZE - 1) / PAGE_SIZE; |
189 | buf->npages = buf->nbufs; | 189 | buf->npages = buf->nbufs; |
190 | buf->page_shift = PAGE_SHIFT; | 190 | buf->page_shift = PAGE_SHIFT; |
191 | buf->page_list = kzalloc(buf->nbufs * sizeof *buf->page_list, | 191 | buf->page_list = kcalloc(buf->nbufs, sizeof(*buf->page_list), |
192 | GFP_KERNEL); | 192 | GFP_KERNEL); |
193 | if (!buf->page_list) | 193 | if (!buf->page_list) |
194 | return -ENOMEM; | 194 | return -ENOMEM; |