[PATCH 2/2] state: bucket_circular: -EUCLEAN means data could be read

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-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@xxxxxxxxxxxxxx>
---
 common/state/backend_bucket_circular.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/state/backend_bucket_circular.c b/common/state/backend_bucket_circular.c
index d8504e035c..9cb9dce2ac 100644
--- a/common/state/backend_bucket_circular.c
+++ b/common/state/backend_bucket_circular.c
@@ -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);
-- 
2.11.0


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux