drivers/mtd: Use kzalloc
authorJulia Lawall <julia@diku.dk>
Thu, 13 May 2010 20:03:15 +0000 (22:03 +0200)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Thu, 13 May 2010 20:23:06 +0000 (21:23 +0100)
commit2bfefa4c9632fb09bfe3277cf7b690818b147654
tree9ddbd55e57e266dfea47e38fa007f47731fed8fb
parentecce2a6f9bdc7635838baeff8a09a76c9a70e7e0
drivers/mtd: Use kzalloc

Use kzalloc rather than the combination of kmalloc and memset.

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

// <smpl>
@@
expression x,size,flags;
statement S;
@@

-x = kmalloc(size,flags);
+x = kzalloc(size,flags);
 if (x == NULL) S
-memset(x, 0, size);
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/mtd/lpddr/qinfo_probe.c
drivers/mtd/maps/ixp2000.c
drivers/mtd/maps/ixp4xx.c
drivers/mtd/maps/pxa2xx-flash.c
drivers/mtd/tests/mtd_pagetest.c
drivers/mtd/tests/mtd_readtest.c
drivers/mtd/tests/mtd_speedtest.c
drivers/mtd/tests/mtd_stresstest.c
drivers/mtd/tests/mtd_subpagetest.c