Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 43b5693d authored by Richard Purdie's avatar Richard Purdie Committed by David Woodhouse
Browse files

[MTD] mtdoops: Fix a bug where block may not be erased



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: default avatarRichard Purdie <rpurdie@rpsys.net>
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent f0482ee3
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -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;
	}