Skip to content

Commit 75ed0a8

Browse files
Julia Lawalldavem330
authored andcommitted
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: Julia Lawall <[email protected]> Acked-by: Divy Le Ray <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 1f3c880 commit 75ed0a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/cxgb3/cxgb3_offload.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1252,7 +1252,7 @@ int cxgb3_offload_activate(struct adapter *adapter)
12521252
struct mtutab mtutab;
12531253
unsigned int l2t_capacity;
12541254

1255-
t = kcalloc(1, sizeof(*t), GFP_KERNEL);
1255+
t = kzalloc(sizeof(*t), GFP_KERNEL);
12561256
if (!t)
12571257
return -ENOMEM;
12581258

0 commit comments

Comments
 (0)