]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/mtd/afs.c
select: deal with math overflow from borderline valid userland data
[linux-2.6-omap-h63xx.git] / drivers / mtd / afs.c
index 6a45be04564b7cd6b92b4b7afab76696d50feb23..d072ca5be689a5ee8f1a426e3d1103762fb75283 100644 (file)
@@ -21,8 +21,6 @@
    This is access code for flashes using ARM's flash partitioning
    standards.
 
-   $Id: afs.c,v 1.15 2005/11/07 11:14:19 gleixner Exp $
-
 ======================================================================*/
 
 #include <linux/module.h>
@@ -207,11 +205,10 @@ static int parse_afs_partitions(struct mtd_info *mtd,
        if (!sz)
                return ret;
 
-       parts = kmalloc(sz, GFP_KERNEL);
+       parts = kzalloc(sz, GFP_KERNEL);
        if (!parts)
                return -ENOMEM;
 
-       memset(parts, 0, sz);
        str = (char *)(parts + idx);
 
        /*