Skip to content

Commit

Permalink
gro: Fix kcalloc argument order
Browse files Browse the repository at this point in the history
First number, then size.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Joe Perches authored and David S. Miller committed Jan 28, 2013
1 parent 4bf613c commit a1b1add
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/net/gro_cells.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ static inline int gro_cells_init(struct gro_cells *gcells, struct net_device *de
int i;

gcells->gro_cells_mask = roundup_pow_of_two(netif_get_num_default_rss_queues()) - 1;
gcells->cells = kcalloc(sizeof(struct gro_cell),
gcells->gro_cells_mask + 1,
gcells->cells = kcalloc(gcells->gro_cells_mask + 1,
sizeof(struct gro_cell),
GFP_KERNEL);
if (!gcells->cells)
return -ENOMEM;
Expand Down

0 comments on commit a1b1add

Please sign in to comment.