[MTD] replace kmalloc+memset with kzalloc
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / drivers / mtd / chips / map_absent.c
index ac01a949b687a4513e7217c0c59ac1f492d06a45..fc478c0f93f55bdcce74f7f82393a5c36a39b605 100644 (file)
@@ -47,13 +47,11 @@ static struct mtd_info *map_absent_probe(struct map_info *map)
 {
        struct mtd_info *mtd;
 
-       mtd = kmalloc(sizeof(*mtd), GFP_KERNEL);
+       mtd = kzalloc(sizeof(*mtd), GFP_KERNEL);
        if (!mtd) {
                return NULL;
        }
 
-       memset(mtd, 0, sizeof(*mtd));
-
        map->fldrv      = &map_absent_chipdrv;
        mtd->priv       = map;
        mtd->name       = map->name;