Skip to content

Commit

Permalink
[MTD] mtdoops: Fix a bug where block may not be erased
Browse files Browse the repository at this point in the history
This makes the driver erase a block when it doesn't find any
existing saved log messages which is safer than assuming the
flash was already erased.

Signed-off-by: Richard Purdie <[email protected]>
Signed-off-by: David Woodhouse <[email protected]>
  • Loading branch information
rpurdie authored and David Woodhouse committed Oct 18, 2008
1 parent f0482ee commit 43b5693
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/mtd/mtdoops.c
Original file line number Diff line number Diff line change
Expand Up @@ -258,9 +258,7 @@ static void find_next_position(struct mtdoops_context *cxt)
if (maxcount == 0xffffffff) {
cxt->nextpage = 0;
cxt->nextcount = 1;
cxt->ready = 1;
printk(KERN_DEBUG "mtdoops: Ready %d, %d (first init)\n",
cxt->nextpage, cxt->nextcount);
schedule_work(&cxt->work_erase);
return;
}

Expand Down

0 comments on commit 43b5693

Please sign in to comment.