Aarya has uploaded this change for review.
erasure_layout.c: Fix incorrect return value in erase_write
On failure of erasefn in erase_write it didn't set the error value in
ret which caused send success status as return value.
Change-Id: Ia3bd5fd250dcd0a03f0281c478b9bacb71872f31
Signed-off-by: Aarya Chaumal <aarya.chaumal@gmail.com>
---
M erasure_layout.c
1 file changed, 17 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/82/74882/1
diff --git a/erasure_layout.c b/erasure_layout.c
index a802ae4..108fea4 100644
--- a/erasure_layout.c
+++ b/erasure_layout.c
@@ -328,9 +328,12 @@
addr, addr + len - 1);
free(region.name);
- if (erasefn(flashctx, addr, len))
+ if (erasefn(flashctx, addr, len)) {
+ ret = -1;
goto _end;
+ }
if (check_erased_range(flashctx, addr, len)) {
+ ret = - 1;
msg_cerr("ERASE FAILED!\n");
goto _end;
}
To view, visit change 74882. To unsubscribe, or for help writing mail filters, visit settings.