X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fmtd%2Fmaps%2Fceiva.c;h=629e6e2641a84c7ca5e2d0ecd53b56566008362b;hb=refs%2Fremotes%2Fvserver;hp=da8584a662f4f4ad01ca7a7ced252f01cf609251;hpb=6a77f38946aaee1cd85eeec6cf4229b204c15071;p=linux-2.6.git diff --git a/drivers/mtd/maps/ceiva.c b/drivers/mtd/maps/ceiva.c index da8584a66..629e6e264 100644 --- a/drivers/mtd/maps/ceiva.c +++ b/drivers/mtd/maps/ceiva.c @@ -14,12 +14,12 @@ * $Id: ceiva.c,v 1.11 2004/09/16 23:27:12 gleixner Exp $ */ -#include #include #include #include #include #include +#include #include #include @@ -122,10 +122,9 @@ static int __init clps_setup_mtd(struct clps_info *clps, int nr, struct mtd_info /* * Allocate the map_info structs in one go. */ - maps = kmalloc(sizeof(struct map_info) * nr, GFP_KERNEL); + maps = kzalloc(sizeof(struct map_info) * nr, GFP_KERNEL); if (!maps) return -ENOMEM; - memset(maps, 0, sizeof(struct map_info) * nr); /* * Claim and then map the memory regions. */ @@ -312,8 +311,7 @@ static void __init clps_locate_partitions(struct mtd_info *mtd) static void __exit clps_destroy_partitions(void) { - if (parsed_parts) - kfree(parsed_parts); + kfree(parsed_parts); } static struct mtd_info *mymtd;