Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 332617
b: refs/heads/master
c: 9cb93fb
h: refs/heads/master
i:
  332615: edda374
v: v3
  • Loading branch information
Brian Norris authored and David Woodhouse committed Jul 6, 2012
1 parent d10ccb3 commit 20c0e8f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d2d48480d16ab349ae5d4732b4d79ff48b4b4171
refs/heads/master: 9cb93fbb5e84a2749e4ad6fec5091d149323a3d4
14 changes: 6 additions & 8 deletions trunk/drivers/mtd/mtdoops.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,14 +169,7 @@ static void mtdoops_workfunc_erase(struct work_struct *work)
cxt->nextpage = 0;
}

while (1) {
ret = mtd_block_isbad(mtd, cxt->nextpage * record_size);
if (!ret)
break;
if (ret < 0) {
printk(KERN_ERR "mtdoops: block_isbad failed, aborting\n");
return;
}
while ((ret = mtd_block_isbad(mtd, cxt->nextpage * record_size)) > 0) {
badblock:
printk(KERN_WARNING "mtdoops: bad block at %08lx\n",
cxt->nextpage * record_size);
Expand All @@ -190,6 +183,11 @@ static void mtdoops_workfunc_erase(struct work_struct *work)
}
}

if (ret < 0) {
printk(KERN_ERR "mtdoops: mtd_block_isbad failed, aborting\n");
return;
}

for (j = 0, ret = -1; (j < 3) && (ret < 0); j++)
ret = mtdoops_erase_block(cxt, cxt->nextpage * record_size);

Expand Down

0 comments on commit 20c0e8f

Please sign in to comment.