]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/mtd/maps/ceiva.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
[linux-2.6-omap-h63xx.git] / drivers / mtd / maps / ceiva.c
index c68b31dc7e6d4979c363a8ac1e32bb0abba09f5b..629e6e2641a84c7ca5e2d0ecd53b56566008362b 100644 (file)
@@ -14,7 +14,6 @@
  * $Id: ceiva.c,v 1.11 2004/09/16 23:27:12 gleixner Exp $
  */
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/types.h>
 #include <linux/ioport.h>
@@ -123,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.
         */
@@ -313,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;