Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 282833
b: refs/heads/master
c: 2f4478c
h: refs/heads/master
i:
  282831: af777eb
v: v3
  • Loading branch information
Wolfram Sang authored and David Woodhouse committed Jan 9, 2012
1 parent 0d071c5 commit 6be1468
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f99640dee209df4730f35a28b02693affd571ad5
refs/heads/master: 2f4478ccff7df845dc9c0f8996a96373122c4417
7 changes: 7 additions & 0 deletions trunk/drivers/mtd/tests/mtd_stresstest.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,12 @@ static int __init mtd_stresstest_init(void)
(unsigned long long)mtd->size, mtd->erasesize,
pgsize, ebcnt, pgcnt, mtd->oobsize);

if (ebcnt < 2) {
printk(PRINT_PREF "error: need at least 2 eraseblocks\n");
err = -ENOSPC;
goto out_put_mtd;
}

/* Read or write up 2 eraseblocks at a time */
bufsize = mtd->erasesize * 2;

Expand Down Expand Up @@ -322,6 +328,7 @@ static int __init mtd_stresstest_init(void)
kfree(bbt);
vfree(writebuf);
vfree(readbuf);
out_put_mtd:
put_mtd_device(mtd);
if (err)
printk(PRINT_PREF "error %d occurred\n", err);
Expand Down

0 comments on commit 6be1468

Please sign in to comment.