When the raw device returns -EUCLEAN we have to return successfully to the upper layer, otherwise it will discard the data. Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx> --- common/state/backend_bucket_cached.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/common/state/backend_bucket_cached.c b/common/state/backend_bucket_cached.c index 781ac2debd..ba0af7f373 100644 --- a/common/state/backend_bucket_cached.c +++ b/common/state/backend_bucket_cached.c @@ -52,12 +52,12 @@ static int state_backend_bucket_cache_fill( int ret; ret = cache->raw->read(cache->raw, &cache->data, &cache->data_len); - if (ret == -EUCLEAN) + if (ret == -EUCLEAN) { cache->force_write = true; - else if (ret) - return ret; + ret = 0; + } - return 0; + return ret; } static int state_backend_bucket_cache_read(struct state_backend_storage_bucket *bucket, -- 2.11.0 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox