Merge branch 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind...
[firefly-linux-kernel-4.4.55.git] / drivers / mtd / tests / mtd_speedtest.c
index 56ca62bb96bf5e14e0a2a60a624717900b0033d7..161feeb7b8b9dc299c2adfcc0f1bd13c8134e273 100644 (file)
@@ -295,12 +295,11 @@ static int scan_for_bad_eraseblocks(void)
 {
        int i, bad = 0;
 
-       bbt = kmalloc(ebcnt, GFP_KERNEL);
+       bbt = kzalloc(ebcnt, GFP_KERNEL);
        if (!bbt) {
                printk(PRINT_PREF "error: cannot allocate memory\n");
                return -ENOMEM;
        }
-       memset(bbt, 0 , ebcnt);
 
        /* NOR flash does not implement block_isbad */
        if (mtd->block_isbad == NULL)