9
0
Fork 0

state: bucket_circular: -EUCLEAN means data could be read

-EUCLEAN returned from state_mtd_peb_read() means that the
data shall still be used. This fixes initialization of buckets
which need cleanup

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Sascha Hauer 2017-03-20 13:33:47 +01:00
parent 1fde9ef265
commit 9df009de99
1 changed files with 1 additions and 1 deletions

View File

@ -390,7 +390,7 @@ static int state_backend_bucket_circular_init(
ret = state_mtd_peb_read(circ, buf, sub_offset,
circ->writesize);
if (ret)
if (ret && ret != -EUCLEAN)
return ret;
ret = mtd_buf_all_ff(buf, circ->writesize);