[coreboot-gerrit] Patch set updated for coreboot: e3bb6bf vboot: fix invalid check for the returned value from spi_flash->write

Patrick Georgi (pgeorgi@google.com) gerrit at coreboot.org
Thu Apr 9 22:17:12 CEST 2015


Patrick Georgi (pgeorgi at google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/9439

-gerrit

commit e3bb6bf81d6ca3ca5c4c633ceba761cb5bb71217
Author: Daisuke Nojiri <dnojiri at chromium.org>
Date:   Wed Nov 12 14:01:23 2014 -0800

    vboot: fix invalid check for the returned value from spi_flash->write
    
    spi_flash->write returns non-zero on error and zero on success, not the
    number of bytes written.
    
    BUG=none
    BRANCH=ToT
    TEST=Booted storm. Verified successfully nvdata was saved.
    
    Original-Change-Id: If50cc1a62a4f06398d1830cca60085b6f925fff3
    Original-Signed-off-by: Daisuke Nojiri <dnojiri at chromium.org>
    Original-Reviewed-on: https://chromium-review.googlesource.com/229389
    Original-Reviewed-by: Aaron Durbin <adurbin at chromium.org>
    Original-Reviewed-by: Randall Spangler <rspangler at chromium.org>
    
    (cherry picked from commit 1e8cdbdb07e99c3f72c35f76d68144f46107acd9)
    Signed-off-by: Aaron Durbin <adurbin at chromium.org>
    
    Change-Id: I216e97f734da8d4b52c2da8329f4143b7b0656cd
---
 src/vendorcode/google/chromeos/vbnv_flash.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/vendorcode/google/chromeos/vbnv_flash.c b/src/vendorcode/google/chromeos/vbnv_flash.c
index cf7c002..665c184 100644
--- a/src/vendorcode/google/chromeos/vbnv_flash.c
+++ b/src/vendorcode/google/chromeos/vbnv_flash.c
@@ -175,8 +175,7 @@ void save_vbnv(const uint8_t *vbnv_copy)
 	if (vbnv_flash_probe())
 		return;  /* error */
 
-	if (spi_flash->write(spi_flash, new_offset,
-			     BLOB_SIZE, vbnv_copy) != BLOB_SIZE) {
+	if (spi_flash->write(spi_flash, new_offset, BLOB_SIZE, vbnv_copy)) {
 		printk(BIOS_ERR, "failed to write nvdata\n");
 		return;  /* error */
 	}



More information about the coreboot-gerrit mailing list