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_subpagetest.c
index 700237a3d120ecc2169a0329eedc42c8cf2cec0d..11204e8aab5f33bb4bcb51c150ab30e63139f8f2 100644 (file)
@@ -354,12 +354,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);
 
        printk(PRINT_PREF "scanning for bad eraseblocks\n");
        for (i = 0; i < ebcnt; ++i) {