diff --git a/src/vboot/vbnv_flash.c b/src/vboot/vbnv_flash.c index d061228a2a..81c4f087af 100644 --- a/src/vboot/vbnv_flash.c +++ b/src/vboot/vbnv_flash.c @@ -165,7 +165,7 @@ void save_vbnv_flash(const uint8_t *vbnv_copy) } } - if (rdev_writeat(rdev, vbnv_copy, new_offset, BLOB_SIZE) < 0) { + if (rdev_writeat(rdev, vbnv_copy, new_offset, BLOB_SIZE) == BLOB_SIZE) { /* write was successful. safely move pointer forward */ ctx->blob_offset = new_offset; memcpy(ctx->cache, vbnv_copy, BLOB_SIZE);