提交 ce8e5c70 编写于 作者: R Rasmus Villemoes 提交者: David S. Miller

net: cavium: liquidio: use kzalloc in setup_glist()

We save a little .text and get rid of the sizeof(...) style
inconsistency.
Signed-off-by: NRasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 f53de1e9
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册