Tag: a05abcb5c912ce7127e5c638b490313e88541784

drivers/net: Use kcalloc or kzalloc

Author: Julia Lawall <julia@diku.dk> Use kcalloc or kzalloc rather than the combination of kmalloc and memset. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression x,y,flags; statement S; type T; @@ x = – kmalloc + kcalloc ( – y * sizeof(T), + y, sizeof(T), flags); if (x == NULL) …

Continue reading