提交 75ed0a89 编写于 作者: J Julia Lawall 提交者: David S. Miller

drivers/net/cxgb3: Use kzalloc for allocating only one thing

Use kzalloc rather than kcalloc(1,...)

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
@@

- kcalloc(1,
+ kzalloc(
          ...)
// </smpl>
Signed-off-by: NJulia Lawall <julia@diku.dk>
Acked-by: NDivy Le Ray <divy@chelsio.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 1f3c8804
...@@ -1252,7 +1252,7 @@ int cxgb3_offload_activate(struct adapter *adapter) ...@@ -1252,7 +1252,7 @@ int cxgb3_offload_activate(struct adapter *adapter)
struct mtutab mtutab; struct mtutab mtutab;
unsigned int l2t_capacity; unsigned int l2t_capacity;
t = kcalloc(1, sizeof(*t), GFP_KERNEL); t = kzalloc(sizeof(*t), GFP_KERNEL);
if (!t) if (!t)
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册