Skip to content

Commit

Permalink
drivers/net/cxgb3: Use kzalloc for allocating only one thing
Browse files Browse the repository at this point in the history
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: Julia Lawall <julia@diku.dk>
Acked-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Julia Lawall authored and David S. Miller committed Jan 4, 2010
1 parent 1f3c880 commit 75ed0a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/cxgb3/cxgb3_offload.c
Original file line number Diff line number Diff line change
Expand Up @@ -1252,7 +1252,7 @@ int cxgb3_offload_activate(struct adapter *adapter)
struct mtutab mtutab;
unsigned int l2t_capacity;

t = kcalloc(1, sizeof(*t), GFP_KERNEL);
t = kzalloc(sizeof(*t), GFP_KERNEL);
if (!t)
return -ENOMEM;

Expand Down

0 comments on commit 75ed0a8

Please sign in to comment.