diff options
Diffstat (limited to 'drivers/mtd/tests/mtd_subpagetest.c')
-rw-r--r-- | drivers/mtd/tests/mtd_subpagetest.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/mtd/tests/mtd_subpagetest.c b/drivers/mtd/tests/mtd_subpagetest.c index 700237a3d120..11204e8aab5f 100644 --- a/drivers/mtd/tests/mtd_subpagetest.c +++ b/drivers/mtd/tests/mtd_subpagetest.c | |||
@@ -354,12 +354,11 @@ static int scan_for_bad_eraseblocks(void) | |||
354 | { | 354 | { |
355 | int i, bad = 0; | 355 | int i, bad = 0; |
356 | 356 | ||
357 | bbt = kmalloc(ebcnt, GFP_KERNEL); | 357 | bbt = kzalloc(ebcnt, GFP_KERNEL); |
358 | if (!bbt) { | 358 | if (!bbt) { |
359 | printk(PRINT_PREF "error: cannot allocate memory\n"); | 359 | printk(PRINT_PREF "error: cannot allocate memory\n"); |
360 | return -ENOMEM; | 360 | return -ENOMEM; |
361 | } | 361 | } |
362 | memset(bbt, 0 , ebcnt); | ||
363 | 362 | ||
364 | printk(PRINT_PREF "scanning for bad eraseblocks\n"); | 363 | printk(PRINT_PREF "scanning for bad eraseblocks\n"); |
365 | for (i = 0; i < ebcnt; ++i) { | 364 | for (i = 0; i < ebcnt; ++i) { |