diff options
Diffstat (limited to 'drivers/mtd/tests/mtd_pagetest.c')
-rw-r--r-- | drivers/mtd/tests/mtd_pagetest.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/mtd/tests/mtd_pagetest.c b/drivers/mtd/tests/mtd_pagetest.c index 921a85df9196..6bc1b8276c62 100644 --- a/drivers/mtd/tests/mtd_pagetest.c +++ b/drivers/mtd/tests/mtd_pagetest.c | |||
@@ -480,12 +480,11 @@ static int scan_for_bad_eraseblocks(void) | |||
480 | { | 480 | { |
481 | int i, bad = 0; | 481 | int i, bad = 0; |
482 | 482 | ||
483 | bbt = kmalloc(ebcnt, GFP_KERNEL); | 483 | bbt = kzalloc(ebcnt, GFP_KERNEL); |
484 | if (!bbt) { | 484 | if (!bbt) { |
485 | printk(PRINT_PREF "error: cannot allocate memory\n"); | 485 | printk(PRINT_PREF "error: cannot allocate memory\n"); |
486 | return -ENOMEM; | 486 | return -ENOMEM; |
487 | } | 487 | } |
488 | memset(bbt, 0 , ebcnt); | ||
489 | 488 | ||
490 | printk(PRINT_PREF "scanning for bad eraseblocks\n"); | 489 | printk(PRINT_PREF "scanning for bad eraseblocks\n"); |
491 | for (i = 0; i < ebcnt; ++i) { | 490 | for (i = 0; i < ebcnt; ++i) { |