]> git.baikalelectronics.ru Git - kernel.git/commit
CDC NCM: Use kzalloc rather than kmalloc followed by memset with 0
authorThomas Meyer <thomas@m3y3r.de>
Thu, 17 Nov 2011 12:43:40 +0000 (12:43 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 22 Nov 2011 20:58:38 +0000 (15:58 -0500)
commitfb5fb9b92c9cd9a01a58cc14b16d0e6f1a59087f
treef72a1135540824d4418201963371438c23b080dd
parentf995cfedd292088e7d2f14cae641408a045d94e5
CDC NCM: Use kzalloc rather than kmalloc followed by memset with 0

This considers some simple cases that are common and easy to validate
Note in particular that there are no ...s in the rule, so all of the
matched code has to be contiguous

The semantic patch that makes this change is available
in scripts/coccinelle/api/alloc/kzalloc-simple.cocci.

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/cdc_ncm.c