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>
Showing
- drivers/mtd/lpddr/qinfo_probe.c 2 additions, 5 deletionsdrivers/mtd/lpddr/qinfo_probe.c
- drivers/mtd/maps/ixp2000.c 1 addition, 2 deletionsdrivers/mtd/maps/ixp2000.c
- drivers/mtd/maps/ixp4xx.c 1 addition, 2 deletionsdrivers/mtd/maps/ixp4xx.c
- drivers/mtd/maps/pxa2xx-flash.c 1 addition, 2 deletionsdrivers/mtd/maps/pxa2xx-flash.c
- drivers/mtd/tests/mtd_pagetest.c 1 addition, 2 deletionsdrivers/mtd/tests/mtd_pagetest.c
- drivers/mtd/tests/mtd_readtest.c 1 addition, 2 deletionsdrivers/mtd/tests/mtd_readtest.c
- drivers/mtd/tests/mtd_speedtest.c 1 addition, 2 deletionsdrivers/mtd/tests/mtd_speedtest.c
- drivers/mtd/tests/mtd_stresstest.c 1 addition, 2 deletionsdrivers/mtd/tests/mtd_stresstest.c
- drivers/mtd/tests/mtd_subpagetest.c 1 addition, 2 deletionsdrivers/mtd/tests/mtd_subpagetest.c
Loading
Please register or sign in to comment