diff options
Diffstat (limited to 'drivers/mtd/tests/mtd_stresstest.c')
-rw-r--r-- | drivers/mtd/tests/mtd_stresstest.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/mtd/tests/mtd_stresstest.c b/drivers/mtd/tests/mtd_stresstest.c index 3854afec56d0..531625fc9259 100644 --- a/drivers/mtd/tests/mtd_stresstest.c +++ b/drivers/mtd/tests/mtd_stresstest.c | |||
@@ -221,12 +221,11 @@ static int scan_for_bad_eraseblocks(void) | |||
221 | { | 221 | { |
222 | int i, bad = 0; | 222 | int i, bad = 0; |
223 | 223 | ||
224 | bbt = kmalloc(ebcnt, GFP_KERNEL); | 224 | bbt = kzalloc(ebcnt, GFP_KERNEL); |
225 | if (!bbt) { | 225 | if (!bbt) { |
226 | printk(PRINT_PREF "error: cannot allocate memory\n"); | 226 | printk(PRINT_PREF "error: cannot allocate memory\n"); |
227 | return -ENOMEM; | 227 | return -ENOMEM; |
228 | } | 228 | } |
229 | memset(bbt, 0 , ebcnt); | ||
230 | 229 | ||
231 | /* NOR flash does not implement block_isbad */ | 230 | /* NOR flash does not implement block_isbad */ |
232 | if (mtd->block_isbad == NULL) | 231 | if (mtd->block_isbad == NULL) |