Skip to content

Commit

Permalink
net: cavium: liquidio: use kzalloc in setup_glist()
Browse files Browse the repository at this point in the history
We save a little .text and get rid of the sizeof(...) style
inconsistency.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Rasmus Villemoes authored and David S. Miller committed Sep 10, 2015
1 parent f53de1e commit ce8e5c7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/net/ethernet/cavium/liquidio/lio_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -818,10 +818,9 @@ static int setup_glist(struct lio *lio)
INIT_LIST_HEAD(&lio->glist);

for (i = 0; i < lio->tx_qsize; i++) {
g = kmalloc(sizeof(*g), GFP_KERNEL);
g = kzalloc(sizeof(*g), GFP_KERNEL);
if (!g)
break;
memset(g, 0, sizeof(struct octnic_gather));

g->sg_size =
((ROUNDUP4(OCTNIC_MAX_SG) >> 2) * OCT_SG_ENTRY_SIZE);
Expand Down

0 comments on commit ce8e5c7

Please sign in to comment.